mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2024-12-18 23:48:56 +02:00
21 lines
679 B
Plaintext
21 lines
679 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);
|
||
|
|
||
|
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");
|