1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-05-15 22:26:32 +02:00

43 lines
929 B
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-10-15 10:07:27 +03:00
Token = "sl.B-uquz3utwEHepKzyqLBfnFvmY1EWTYDus5LDjT5ux5srp9PJRtr7CvMv20nVl2rRGC3K4J_X5...";
URL = "https://api.athenaeum.digital/test_data/document.docx";
2024-08-13 16:47:32 +03:00
Result = OPI_Dropbox.UploadFileByURL(Token, URL, Path);
```
2024-10-15 09:53:37 +03:00
```json title="Result"
2024-08-14 09:06:31 +03:00
{
2024-10-06 16:55:08 +03:00
".tag": "async_job_id",
2024-10-09 09:42:00 +03:00
"async_job_id": "GB72x7EzrHQAAAAAAAAAAQ"
2024-10-06 16:55:08 +03:00
}
```