Upload video to server
Uploads video to the group for further use
Function UploadVideoToServer(Val Video, Val Name, Val Description = "", Val Album = "", Val Parameters = "") Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Video | --file | String, BinaryData | ✔ | Video file |
Name | --title | String | ✔ | Video name |
Description | --description | String | ✖ | Video description |
Album | --album | String | ✖ | Album ID, if necessary |
Parameters | --auth | Structure Of String | ✖ | Authorization JSON or path to .json |
Returns: Map Of KeyAndValue - serialized JSON response from VK
tip
Parameters with Binary data type can also accept file paths on disk and URLs
1C:Enterprise/OneScript code example
Parameters = GetVKParameters();
Video = "https://api.athenaeum.digital/test_data/video.mp4"; // URL, Binary Data or Path to file
Name = "NewVideo";
Description = "Video description";
Result = OPI_VK.UploadVideoToServer(Video, Name, Description, , Parameters);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint vk UploadVideoToServer \
--file "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/video.mp4" \
--title "NewVideo" \
--description "Video description" \
--auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
:: JSON data can also be passed as a path to a .json file
oint vk UploadVideoToServer ^
--file "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/video.mp4" ^
--title "NewVideo" ^
--description "Video description" ^
--auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
Result
{
"video_hash": "948ffc06db1b09fb7f",
"size": 1137878,
"direct_link": "https://vkvd382.okcdn.ru/?expires=1728713194552&srcIp=93.125.42.204&pr=40&srcAg=UNKNOWN&ms=45.136.20.139&type=4&sig=VAfnTuuSNjs&ct=27&urls=45.136.22.139&clientType=14&appId=512000384397&zs=72&id=7195954121353",
"owner_id": -218861756,
"video_id": 456239605
}