1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-27 02:43:54 +02:00
OpenIntegrations/docs/en/examples/YandexDisk/UploadFile.txt
2024-09-25 16:46:44 +03:00

13 lines
470 B
Plaintext

Path1 = "/" + String(New UUID) + ".png";
Path2 = "/" + String(New UUID) + ".png";
Token = "y0_AgAAAABdylaOAAs0QgAAAAD5i-a...";
Image = "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg"; // URL
TFN = GetTempFileName("png"); // Path
CopyFile(Image, TFN);
Result = OPI_YandexDisk.UploadFile(Token, Path1, Image, True);
Result = OPI_YandexDisk.UploadFile(Token, Path2, TFN, True);