1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-18 23:48:56 +02:00
OpenIntegrations/docs/en/md/Dropbox/File-and-directory-management/Download-file.md

43 lines
1015 B
Markdown
Raw Normal View History

---
sidebar_position: 11
---
# Download file
Downloads a file by the specified path or ID
2024-07-10 12:58:29 +02:00
`Function DownloadFile(Val Token, Val Path) Export`
| Parameter | CLI option | Type | Destination |
|-|-|-|-|
| Token | --token | String | Token |
| Path | --path | String | Path or ID of the file |
Returns: BinaryData - binary data of the file
2024-07-10 13:05:58 +02:00
<br/>
2024-07-10 12:58:29 +02:00
```bsl title="Code example"
2024-07-10 13:24:11 +02:00
Token = "sl.B2ieEHcB9I9BTwJFjbf_MQtoZMKjGYgkpBqzQkvBfuSz41Qpy5r3d7a4ax22I5ILWhd9KLbN5L...";
Path = "/New/pic.png";
Result = OPI_Dropbox.DownloadFile(Token, Path);
```
```sh title="CLI command example"
oint dropbox DownloadFile --token "sl.B2ieEHcB9I9BTwJFjbf_MQtoZMKjGYgkpBqzQkvBfuSz41Qpy5r3d7a4ax22I5ILWhd9KLbN5L..." --path %path%
```
```json title="Result"
2024-07-10 13:11:17 +02:00
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…
```