1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-02-09 13:47:03 +02:00

48 lines
1.1 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-27 21:04:12 +03:00
Token = "sl.B9sYGdZdLILSnqlGZCwLFCstq1B1GsgevbBkwi4UK_UlNyhGAoJ1fKoXMy3dQhkEb3e80HTL6g...";
2024-09-24 11:38:18 +03:00
URL = "https://openintegrations.dev/test_data/document.docx";
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"
}
```