1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-18 23:48:56 +02:00
OpenIntegrations/docs/en/examples/VKTeams/SendFile.txt

21 lines
679 B
Plaintext
Raw Normal View History

2024-08-13 13:35:37 +02:00
 Token = FunctionParameters["VkTeams_Token"];
ChatID = FunctionParameters["VkTeams_ChatID"];
Text = "File caption";
File = FunctionParameters["Document"]; // URL
FilePath = GetTempFileName("docx"); // Path
CopyFile(File, FilePath);
FileBD = New BinaryData(FilePath); // Binary
Result = OPI_VKTeams.SendFile(Token, ChatID, File);
OPI_TestDataRetrieval.WriteLog(Result, "SendFile (URL)", "VkTeams");
Result = OPI_VKTeams.SendFile(Token, ChatID, FilePath, Text);
OPI_TestDataRetrieval.WriteLog(Result, "SendFile (Path)", "VkTeams");
Result = OPI_VKTeams.SendFile(Token, ChatID, File, Text, "ImportantDocument.docx");