2024-10-15 10:50:56 +03:00
|
|
|
---
|
2024-10-15 10:16:04 +03:00
|
|
|
sidebar_position: 11
|
|
|
|
---
|
|
|
|
|
2024-10-15 10:50:56 +03:00
|
|
|
import Tabs from '@theme/Tabs';
|
|
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
|
2024-10-15 10:16:04 +03:00
|
|
|
# Download file
|
|
|
|
Downloads a file by the specified path or ID
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`Function DownloadFile(Val Token, Val Path) Export`
|
|
|
|
|
2024-10-15 15:15:47 +03:00
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|
|
|-|-|-|-|-|
|
|
|
|
| Token | --token | String | ✔ | Token |
|
|
|
|
| Path | --path | String | ✔ | Path or ID of the file |
|
2024-10-15 10:16:04 +03:00
|
|
|
|
|
|
|
|
|
|
|
Returns: BinaryData - binary data of the file
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-15 21:15:56 +03:00
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
2024-10-27 14:30:57 +03:00
|
|
|
Token = "sl.B_msgdiPWezavqeIij7xO0CoH6lFDkcxzp9wOv6yyW7dixfCrQAW21oFDnvVjkfZa4UegdzdP0...";
|
2024-10-15 10:16:04 +03:00
|
|
|
Path = "/New/pic.png";
|
|
|
|
|
|
|
|
Result = OPI_Dropbox.DownloadFile(Token, Path);
|
|
|
|
```
|
|
|
|
|
|
|
|
|
2024-10-20 22:36:03 +03:00
|
|
|
<Tabs>
|
|
|
|
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
|
|
```bash
|
|
|
|
oint dropbox DownloadFile \
|
2024-10-22 08:59:24 +03:00
|
|
|
--token "***" \
|
|
|
|
--path "/New/pic.png"
|
2024-10-20 22:36:03 +03:00
|
|
|
```
|
|
|
|
</TabItem>
|
|
|
|
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
|
|
```batch
|
|
|
|
oint dropbox DownloadFile ^
|
2024-10-22 08:59:24 +03:00
|
|
|
--token "***" ^
|
|
|
|
--path "/New/pic.png"
|
2024-10-20 22:36:03 +03:00
|
|
|
```
|
|
|
|
</TabItem>
|
|
|
|
</Tabs>
|
2024-10-15 10:16:04 +03:00
|
|
|
|
|
|
|
|
|
|
|
```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…
|
|
|
|
```
|