Upload file by URL
Downloads a file to disk from the specified URL
Function UploadFileByURL(Val Token, Val Path, Val Address) Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Token | --token | String | ✔ | Token |
Path | --path | String | ✔ | Path to place the downloaded file |
Address | --url | String | ✔ | File URL |
Returns: Map Of KeyAndValue - serialized JSON response from Yandex
1C:Enterprise/OneScript code example
Token = "y0_AgAAAABdylaOAAs0QgAAAAD5i-a...";
Address = "https://hut.openintegrations.dev/test_data/picture.jpg";
Path = "/" + String(New UUID) + ".png";
Result = OPI_YandexDisk.UploadFileByURL(Token, Path, Address);
- Bash
- CMD/Bat
oint yadisk UploadFileByURL \
--token "***" \
--path "/39037f70-82d1-4344-8e3b-1a3229cdbc5b.png" \
--url "https://hut.openintegrations.dev/test_data/picture.jpg"
oint yadisk UploadFileByURL ^
--token "***" ^
--path "/39037f70-82d1-4344-8e3b-1a3229cdbc5b.png" ^
--url "https://hut.openintegrations.dev/test_data/picture.jpg"
Result
{
"method": "GET",
"href": "https://cloud-api.yandex.net/v1/disk/operations/893a9db1e6d5945418e380209d3840689cc1274fb2e8150d8e1057f22be4427c",
"templated": false
}