1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-06-02 23:27:50 +02:00

42 lines
1.0 KiB
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 6
---
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
Gets file by ID
`Function DownloadFile(Val Token, Val Identifier, Val SavePath = "") Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| Token | --token | String | Token |
| Identifier | --object | String | File identifier |
| SavePath | --out | String | File save path |
Returns: BinaryData,String - Binary data or file path when SavePath parameter is specified
<br/>
```bsl title="Code example"
Token = "ya29.a0AcM612zdAe2M8Ywdxt7xmK1VAAj2m3yjTdP1Ap8cFmqbE8lVngjIAujPtjc_c94MCuKNLfn7MSssBd6NfMXDQDrHMUv7Fgjp7cjuXk68n...";
Identifier = "14hysfOxsStktI4JZEXRiSZ9Rl69wNJwX";
Result = OPI_GoogleDrive.DownloadFile(Token, Identifier);
```
```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…
```