2024-06-07 11:53:24 +00:00
|
|
|
---
|
|
|
|
sidebar_position: 10
|
|
|
|
---
|
|
|
|
|
|
|
|
# Upload video to server
|
|
|
|
Uploads video to the group for further use
|
|
|
|
|
|
|
|
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-07-10 13:58:29 +03:00
|
|
|
`Function UploadVideoToServer(Val Video, Val Name, Val Description = "", Val Album = "", Val Parameters = "") Export`
|
2024-06-07 11:53:24 +00:00
|
|
|
|
2024-08-13 15:52:26 +03:00
|
|
|
| Parameter | CLI option | Type | 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 |
|
2024-06-07 11:53:24 +00:00
|
|
|
|
2024-08-13 15:52:26 +03:00
|
|
|
|
|
|
|
Returns: Map Of KeyAndValue - Serialized JSON response from VK
|
2024-06-07 11:53:24 +00:00
|
|
|
|
2024-07-10 14:05:58 +03:00
|
|
|
<br/>
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-07-10 13:58:29 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-07 11:53:24 +00:00
|
|
|
```bsl title="Code example"
|
2024-08-13 16:47:32 +03:00
|
|
|
Parameters = GetVKParameters();
|
|
|
|
|
|
|
|
Video = "https://openintegrations.dev/test_data/video.mp4";
|
|
|
|
Name = "NewVideo";
|
|
|
|
Description = "Video description";
|
|
|
|
|
|
|
|
Result = OPI_VK.UploadVideoToServer(Video, Name, Description, , Parameters);
|
2024-06-07 11:53:24 +00:00
|
|
|
```
|
2024-08-13 15:52:26 +03:00
|
|
|
|
2024-07-10 11:59:55 +03:00
|
|
|
|
2024-06-07 11:53:24 +00:00
|
|
|
|
|
|
|
```sh title="CLI command example"
|
2024-08-13 15:52:26 +03:00
|
|
|
|
|
|
|
oint vk UploadVideoToServer --file "https://openintegrations.dev/test_data/video.mp4" --title %title% --description "Video description" --album %album% --auth "GetVKParameters()"
|
2024-06-07 11:53:24 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```json title="Result"
|
2024-07-10 14:11:17 +03:00
|
|
|
{
|
2024-08-13 15:52:26 +03:00
|
|
|
"video_hash": "a833866c6db82314f7",
|
|
|
|
"size": 1137878,
|
|
|
|
"direct_link": "https://vkvd124.mycdn.me/?expires=1718104740308&srcIp=20.172.5.93&pr=40&srcAg=UNKNOWN&ms=185.226.53.168&type=4&sig=bcm4dKyuOlo&ct=27&urls=45.136.20.202&clientType=14&appId=512000384397&zs=43&id=6569231256185",
|
|
|
|
"owner_id": -218861756,
|
|
|
|
"video_id": 456239138
|
|
|
|
}
|
2024-06-07 11:53:24 +00:00
|
|
|
```
|