Skip to main content

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

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
FileURL--urlStringURL source of the file
Path--pathStringSave 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);
    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"
}