1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-25 12:24:39 +02:00

48 lines
1.0 KiB
Markdown
Raw Normal View History

---
sidebar_position: 5
---
# Upload file by URL
Uploads a file to the cloud drive by fetching it from the specified URL
2024-07-10 13:58:29 +03:00
`Function UploadFileByURL(Val Token, Val FileURL, Val Path) Export`
| Parameter | CLI option | Type | 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
2024-07-10 14:05:58 +03:00
<br/>
2024-07-10 13:58:29 +03:00
```bsl title="Code example"
2024-08-13 16:47:32 +03:00
Path = "/New/url_doc.docx";
2024-09-17 12:29:46 +03:00
Token = FunctionParameters["Dropbox_Token"];
URL = FunctionParameters["Document"];
2024-08-13 16:47:32 +03:00
Result = OPI_Dropbox.UploadFileByURL(Token, URL, Path);
```
```sh title="CLI command example"
oint dropbox UploadFileByURL --token "sl.B6AQWp9MlZlz4iaf41whVKxX9-MXeCiQhPRe4YIRxFmZ3zHsdjmOAatzgaWVhqmlIOvDD6WIUQ..." --url %url% --path %path%
```
```json title="Result"
2024-08-14 09:06:31 +03:00
{
".tag": "async_job_id",
"async_job_id": "41d0vPCn2mYAAAAAAAAAAQ"
}
```