1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-25 22:12:29 +02:00
Files
OpenIntegrations/docs/en/md/Dropbox/File-and-directory-management/Download-file.mdx
Vitaly the Alpaca (bot) 47fa4e92bb Main build (Jenkins)
2025-06-27 11:47:43 +03:00

61 lines
1.6 KiB
Plaintext
Vendored

---
sidebar_position: 11
description: Download file and other functions to work with Dropbox in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Dropbox]
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Download file
Downloads a file by the specified path or ID
`Function DownloadFile(Val Token, Val Path) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Token |
| Path | --path | String | ✔ | Path or ID of the file |
Returns: BinaryData - binary data of the file
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Token = FunctionParameters["Dropbox_Token"];
Path = "/New/pic.png";
Result = OPI_Dropbox.DownloadFile(Token, Path);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint dropbox DownloadFile \
--token "***" \
--path "/New/pic.png"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint dropbox DownloadFile ^
--token "***" ^
--path "/New/pic.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…
```