1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-04 10:34:52 +02:00
OpenIntegrations/docs/en/examples/VKTeams/SendFile.txt
Vitaly the Alpaca (bot) ab33d2f19d Main build (Jenkins)
2024-09-17 12:29:46 +03:00

17 lines
548 B
Plaintext

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);
Result = OPI_VKTeams.SendFile(Token, ChatID, FilePath, Text);
Result = OPI_VKTeams.SendFile(Token, ChatID, FileBD, Text, "ImportantDocument.docx");