1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2026-05-22 10:05:29 +02:00
Files
OpenIntegrations/docs/en/md/Yandex_Disk/File-and-folder-management/Download-file.mdx
T
Vitaly the Alpaca (bot) e0572c1b9a Main build (Jenkins)
2024-11-16 14:34:22 +03:00

60 lines
1.5 KiB
Plaintext

---
sidebar_position: 7
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Download file
Downloads a file at the specified path
`Function DownloadFile(Val Token, Val Path, Val SavePath = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Token |
| Path | --path | String | ✔ | Path to the file for downloading |
| SavePath | --out | String | ✖ | File save path |
Returns: BinaryData,String - Binary data or file path when SavePath parameter is specified
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Token = "y0_AgAAAABdylaOAAs0QgAAAAD5i-a...";
Path = "/74217a82-f3e0-4098-b4d8-46f03902ef61.png";
Result = OPI_YandexDisk.DownloadFile(Token, Path);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint yadisk DownloadFile \
--token "***" \
--path "/ad4a7420-cfa0-400f-b41f-e58f922b4f16.png"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint yadisk DownloadFile ^
--token "***" ^
--path "/ad4a7420-cfa0-400f-b41f-e58f922b4f16.png"
```
</TabItem>
</Tabs>
```json title="Result"
NOT JSON: FF D8 FF E1 54 C1 45 78 69 66 00 00 49 49 2A 00 08 00 00 00 0B 00 0E 01 02 00 20 00 00 00 92 00 00 00 0F 01 02 00 05 00 00 00 B2 00 00 00 10 01 02 00 07 00 00 00 B8 00 00 00 12 01 03 00 01 00…
```