Upload video to server
Uploads video to the group for further use
- Parameters
- Advanced call ?
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 parameters. See GetAuthParameters |
Returns
Map Of KeyAndValue - serialized JSON response from VK
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
tip
Parameters with Binary data type can also accept file paths on disk and URLs
1C:Enterprise/OneScript code example
Parameters = GetVKParameters();
Video = "https://hut.openintegrations.dev/test_data/video.mp4"; // URL, Binary data or File path
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://hut.openintegrations.dev/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://hut.openintegrations.dev/test_data/video.mp4" ^
--title "NewVideo" ^
--description "Video description" ^
--auth "{'access_token':'***','owner_id':'-218861756','app_id':'51694790','group_id':'218861756'}"
Result
{
"video_hash": "994e3b2a475acde9b5",
"size": 1137878,
"direct_link": "https://vkvd759.okcdn.ru/?expires=1780061595813&srcIp=93.125.42.204&pr=40&srcAg=UNKNOWN&ms=95.163.35...",
"owner_id": -218861756,
"video_id": 456241352
}