You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-27 22:18:36 +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.AFl4exnJTfu3ktlAB5SL9c6m8KfDrkILdZu1-5pPnA-_58JlWcvj507ryybadExtpMlE1MsEb1PApmydF-aSTQ6CkBMGtumKCpUlIP9a0uJkHkIkaFyZKqeVj1SCGwJdpyihz_DqlOHPP_qpFaOj52r4RJeMVmESiHRLyG0lv1J_a4gk0hqu0ykbRDMYh1F9iOg7QzbHFlrj8b5HS5RJDMxAHSuuyNPBiR3Vnvd-MHtyHWTZs9k3krDn1Ytw6kMCMbnjEA2S4L0er3sryTh530nzCsFq4Z6IEObBeT1jIV6yoY9gdDM3WZkfbbVe2l0KUJ8xoS0v1Gv0_QU75Oa9bwQiGf2tnyzo6kGMO5r-x4nzHUEf0POg0s_715VXHU22mZNeNqbKJd6S5tcFxvv7SjNgqsuwXG7Lk7g0p25gecCJ_Epi34ZjaMVvTrR9WKSvNvZ8rtKyGpBXZrg3CLLdMsSjMUWxiW36RAFCBNBJRw73EnQ5BhzwhdeqUu3BF11KCawloX3I8nWOQm2c5f1OKgSAw0ZAPaHGySULVTf1NUe-z2c1Fq-ws_RedL0hnqbWV0v_VH07P3ioVrOOuAmt7QHHlS1h6HLWB1wmsw6IkJUWeCkWtNHgCKVzGNn-2JcnLrPOHhzWLeNi7oYWfzFQ-fyT3JMhEI8Ojjc3MiyGzvrkOFRkUy_0HPy30_MlnPhaPdnqlDuYH9agx8q2cdVuF4iA6pGYiGO...";
|
|
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"
|
|
}
|
|
```
|