Skip to main content

Download file

Downloads a file by the specified path or ID

Function DownloadFile(Val Token, Val Path) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
Path--pathStringPath or ID of the file

Returns: BinaryData - binary data of the file


1C:Enterprise/OneScript code example
    Token = "sl.CBL71_21WiKphqlWV34l0tlFn8eGn_YrnPrMexNmHltofj3DkBRsnpQEFY5O5H6i-iRl3bPDBi...";
Path = "/New/pic.png";

Result = OPI_Dropbox.DownloadFile(Token, Path);
    oint dropbox DownloadFile \
--token "***" \
--path "/New/pic.png"
Result
NOT JSON: FF D8 FF E1 54 C1 45 78 69 66 00 00 49 49 2A 00 08 00 00 00 0B 00 0E 01 02 00 20 00 00 00 92 00 00 00 0F 01 02 00 05 00 00 00 B2 00 00 00 10 01 02 00 07 00 00 00 B8 00 00 00 12 01 03 00 01 00