1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-12-21 01:50:24 +02:00
OpenIntegrations/docs/en/md/Yandex_Disk/File-and-folder-management/Upload-file-by-url.md
2024-06-05 13:35:05 +03:00

1.2 KiB

sidebar_position
11

Upload file by URL

Downloads a file to disk from the specified URL

Function UploadFileByURL(Val Token, Val Path, Val Address) Export

Parameter CLI option Type Destination
Token --token String Token
Path --path String Path to place the downloaded file
Address --url String File URL

Returns: Key-Value Pair - serialized JSON response from Yandex

	
 
 Token = "y0_AgAAAABdylaOAA...";
 Path = "/Alpaca.png";
 Address = "https://raw.githubusercontent.com/Bayselonarrend/OpenIntegrations/main/Media/logo.png";
 
 Response = OPI_YandexDisk.UploadFileByURL(Token, Path, Address); //Map
 Response = OPI_Tools.JSONString(Response); //String
 
 
	
 
 oint yadisk UploadFileByURL --token "y0_AgAAAABdylaOAA..." --path "/Alpaca.png" --url "https://raw.githubusercontent.com/Bayselonarrend/OpenIntegrations/main/Media/logo.png"



{
 "templated": false,
 "method": "GET",
 "href": "https://cloud-api.yandex.net/v1/disk/operations/b78a7ef2dd49971aa22e5e72f2e615db885da9947d7c61b2822de23a99e855a1"
 }