Skip to main content

Download file

Gets file by ID

Function DownloadFile(Val Token, Val Identifier, Val SavePath = "") Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
Identifier--objectStringFile identifier
SavePath--outStringFile save path
Returns

BinaryData,String - Binary data or file path when SavePath parameter is specified

1C:Enterprise/OneScript code example
Token = "ya29.a0AT3oNZ89Gfvy6_DUg_tviJJnmBXSmGRrPL6Vym5gPCsPQEa3F606plSWJttyabLz5gHJY63An6XG9wKNlbVK4fkTSF_KNhqT5M6IGUm8THO6IWF0iGzg5z2SO...";
Identifier = "1oUMoSImbl8NKBVWQE9zkBdJ0QIPrkhtb";

Result = OPI_GoogleDrive.DownloadFile(Token, Identifier);
oint gdrive DownloadFile \
--token "***" \
--object "168lXYVR7WNtF0eUF0sCSsd1DB_YjuOmN"
Result
"<Binary data>"