Skip to main content

Upload file by URL

Downloads a file to disk from the specified URL

Function UploadFileByURL(Val Token, Val Path, Val Address) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
Path--pathStringPath to place the downloaded file
Address--urlStringFile URL
Returns

Map Of KeyAndValue - serialized JSON response from Yandex

1C:Enterprise/OneScript code example
Token = "y0__xCOranuBRj1uTsgs8z_iRV...";
Address = "https://releases.openintegrations.dev/test_data/picture.jpg";
Path = "/" + String(New UUID) + ".png";

Result = OPI_YandexDisk.UploadFileByURL(Token, Path, Address);
oint yadisk UploadFileByURL \
--token "***" \
--path "/c307c787-5771-458d-b519-7f27984fdaa9.png" \
--url "https://releases.openintegrations.dev/test_data/picture.jpg"
Result
{
"method": "GET",
"href": "https://cloud-api.yandex.net/v1/disk/operations/b0028ab1af1159cbe010c1884d0bbbdec3efbed8ddaa56975695b817a9969e73",
"templated": false
}