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 "/85adb453-65ab-438a-8cd3-216778e18179.png" \
--url "https://hut.openintegrations.dev/test_data/picture.jpg"
oint yadisk UploadFileByURL ^
--token "***" ^
--path "/85adb453-65ab-438a-8cd3-216778e18179.png" ^
--url "https://hut.openintegrations.dev/test_data/picture.jpg"
Result
{
"method": "GET",
"href": "https://cloud-api.yandex.net/v1/disk/operations/58dbfb25ddd8a2d5ff2cea4b6a6b90f3bd4545ee8e43b943788db5371d1f5ee3",
"templated": false
}