You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-29 22:27:42 +02:00
66 lines
2.3 KiB
Plaintext
Vendored
66 lines
2.3 KiB
Plaintext
Vendored
---
|
|
sidebar_position: 5
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# Upload file by URL
|
|
Uploads a file to the cloud drive by fetching it from the specified URL
|
|
|
|
|
|
|
|
`Function UploadFileByURL(Val Token, Val FileURL, Val Path) Export`
|
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|-|-|-|-|-|
|
|
| Token | --token | String | ✔ | Token |
|
|
| FileURL | --url | String | ✔ | URL source of the file |
|
|
| Path | --path | String | ✔ | Save path on Dropbox |
|
|
|
|
|
|
Returns: Map Of KeyAndValue - serialized JSON response from Dropbox
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
Path = "/New/url_doc.docx";
|
|
Token = "sl.u.AFuMXJvP0OBGc0XGkoZpbGSjYAMMylRDNaqwGQXpjXF3o2bAIj5AD-pJmA_NR8HXW4IknARZbNwcjpUmd1miKCVgO-zgJ5-0oR2HNUTeGLtJ481X1igC2csF8m-o6ePDeX3QxArngo5eM1wbaae55y8rgGy6ATw-Cn1SuZezFHv9-2vv_KVyS-rZgXz0JlAd2MDt8oE-mQnvUtXj4J6nTM78zgJYvzjRTtTrKDnBeH6Fr-yitVjUh_huNRLFAClxCvaUvx2on-u8d4D8Ldf51ucQ8H3vjnTO9GOiFQ-iMkhBFlvPbcCNRqh0qwxBMZbevfv7jGsiQAtw4HtUFZ3G06IV2tmm3EjjHCTjVHa5T8YU1h8EBoBcJjsd5NlINcB68UlGcu0sSSTHittqbb2-Ks9ZCP-Or_6NCxBRKYokqOFuE4M14kxfeVzAT2yvJ1cijHWjcEkJP5kDCYArRpw7fIJxOXm7-p2vN3X0Z4Iq4jh__oeUN34OpfKEPM8TJNLwY_kSMGMrWngxzQIfMfRmzDKynSkL4l8LuPM4YVmhFIh8NoYODkVlqWBfReA5bOuqDEwLiwpms0pz1mcE5d7ZjoB5jldaXzO3NbFdOtbeoiVqwQwbNaqm13BbWrIo0RMxfXGvy8J2dI9b9zYDgOU_c_xgMc_SW-PcdJ03kAPovqXlslNYC4uv-02NUllr2gZ5qQlKFgerMDDojVgeoUVs9w0Sceos7ie...";
|
|
URL = "https://api.athenaeum.digital/test_data/document.docx";
|
|
|
|
Result = OPI_Dropbox.UploadFileByURL(Token, URL, Path);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint dropbox UploadFileByURL \
|
|
--token "***" \
|
|
--url "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/document.docx" \
|
|
--path "/New/url_doc.docx"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint dropbox UploadFileByURL ^
|
|
--token "***" ^
|
|
--url "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/document.docx" ^
|
|
--path "/New/url_doc.docx"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="Result"
|
|
{
|
|
".tag": "async_job_id",
|
|
"async_job_id": "GB72x7EzrHQAAAAAAAAAAQ"
|
|
}
|
|
```
|