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
1C:Enterprise/OneScript code example
Path = "/New/url_doc.docx";
Token = "sl.CBL71_21WiKphqlWV34l0tlFn8eGn_YrnPrMexNmHltofj3DkBRsnpQEFY5O5H6i-iRl3bPDBi...";
URL = "https://api.athenaeum.digital/test_data/document.docx";
Result = OPI_Dropbox.UploadFileByURL(Token, URL, Path);
- Bash
- CMD/Bat
oint dropbox UploadFileByURL \
--token "***" \
--url "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/document.docx" \
--path "/New/url_doc.docx"
oint dropbox UploadFileByURL ^
--token "***" ^
--url "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/document.docx" ^
--path "/New/url_doc.docx"
Result
{
".tag": "async_job_id",
"async_job_id": "GB72x7EzrHQAAAAAAAAAAQ"
}