Save public object to disk
Saves the public object to your disk
- Parameters
- Advanced call ?
Function SavePublicObjectToDisk(Val Token, Val URL, From = "", Target = "") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Token | --token | String | ✔ | Token |
| URL | --url | String | ✔ | Object address |
| From | --from | String | ✖ | Path within public catalog (folders only) |
| Target | --to | String | ✖ | File save path |
Returns
Map Of KeyAndValue - serialized JSON response from Yandex
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
1C:Enterprise/OneScript code example
Token = "y0__xCOranuBRj1uTsgs8z_iRV...";
URL = "https://yadi.sk/d/n0QfpfP48V7piQ";
Result = OPI_YandexDisk.SavePublicObjectToDisk(Token, URL);
- Bash
- CMD/Bat
oint yadisk SavePublicObjectToDisk \
--token "***" \
--url "https://yadi.sk/d/B-mJxgwE6rZhdw"
oint yadisk SavePublicObjectToDisk ^
--token "***" ^
--url "https://yadi.sk/d/B-mJxgwE6rZhdw"
Result
{
"path": "disk:/Загрузки/498b564d-db83-4012-a4cb-8d01041d8eb2.png",
"type": "file",
"name": "498b564d-db83-4012-a4cb-8d01041d8eb2.png",
"created": "2026-05-26T14:01:46+00:00",
"modified": "2026-05-26T14:01:46+00:00",
"size": 2114023,
"mime_type": "multipart",
"md5": "9e0176f87f6565a22f78e0f9b39a4d78",
"sha256": "89f8eb42a35208a17c85036e17237b0aa0657e1841efa6171dc5acbc0dea9e18",
"media_type": "image",
"resource_id": "1573541518:436b0ad7328de0450ef5af8f58ac7f35947a4ebb0eb4aa102c1535808d62028e",
"revision": 1779804106283387,
"comment_ids": {
"public_resource": "1573541518:436b0ad7328de0450ef5af8f58ac7f35947a4ebb0eb4aa102c1535808d62028e",
"private_resource": "1573541518:436b0ad7328de0450ef5af8f58ac7f35947a4ebb0eb4aa102c1535808d62028e"
},
"exif": {},
"antivirus_status": "clean",
"file": "https://downloader.disk.yandex.ru/disk/e62863af93eb373e3d4b78b08604b2761893cdbd3178c76110f48ac6de994..."
}