Upload photo to server
Uploads photo to server for further use
Function UploadPhotoToServer(Val Image, Val Parameters = "", Val View = "Post") Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Image | --file | String, BinaryData | ✔ | Image file |
Parameters | --auth | Structure Of String | ✖ | Authorization JSON or path to .json |
View | --type | String | ✖ | Upload type (Post, Product, Story, Poll, Other) |
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();
Image = "https://hut.openintegrations.dev/test_data/picture.jpg"; // URL, Binary Data or File path
View = "Post";
Result = OPI_VK.UploadPhotoToServer(Image, Parameters, View);
- Bash
- CMD/Bat
oint vk UploadPhotoToServer \
--file ""https://hut.openintegrations.dev/test_data/picture.jpg"" \
--auth ""/tmp/jm3z40c2.mbu.json"" \
--type ""Post""
oint vk UploadPhotoToServer ^
--file ""https://hut.openintegrations.dev/test_data/picture.jpg"" ^
--auth ""/tmp/jm3z40c2.mbu.json"" ^
--type ""Post""
Result
{
"response": [
{
"album_id": -14,
"date": 1757971934,
"id": 457248579,
"owner_id": 657846756,
"access_key": "4829bddcbc656e16c1",
"sizes": [
{
"height": 54,
"type": "s",
"width": 72,
"url": "https://sun9-38.userapi.com/s/v1/if2/-2rc3gmkRtrfvlX4UU2Uq6y50dNxlKvsD60kV6ZVyCbQUNZd8j1KqpNQMgyWm0kOj5UTFdvunOUOPDqDFrguizwQ.jpg?quality=96&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=72x0"
},
{
"height": 120,
"type": "m",
"width": 160,
"url": "https://sun9-38.userapi.com/s/v1/if2/-2rc3gmkRtrfvlX4UU2Uq6y50dNxlKvsD60kV6ZVyCbQUNZd8j1KqpNQMgyWm0kOj5UTFdvunOUOPDqDFrguizwQ.jpg?quality=96&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=160x0"
},
{
"height": 480,
"type": "x",
"width": 640,
"url": "https://sun9-38.userapi.com/s/v1/if2/-2rc3gmkRtrfvlX4UU2Uq6y50dNxlKvsD60kV6ZVyCbQUNZd8j1KqpNQMgyWm0kOj5UTFdvunOUOPDqDFrguizwQ.jpg?quality=96&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=640x0"
},
{
"height": 810,
"type": "y",
"width": 1080,
"url": "https://sun9-38.userapi.com/s/v1/if2/-2rc3gmkRtrfvlX4UU2Uq6y50dNxlKvsD60kV6ZVyCbQUNZd8j1KqpNQMgyWm0kOj5UTFdvunOUOPDqDFrguizwQ.jpg?quality=96&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=1080x0"
},
{
"height": 960,
"type": "z",
"width": 1280,
"url": "https://sun9-38.userapi.com/s/v1/if2/-2rc3gmkRtrfvlX4UU2Uq6y50dNxlKvsD60kV6ZVyCbQUNZd8j1KqpNQMgyWm0kOj5UTFdvunOUOPDqDFrguizwQ.jpg?quality=96&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=1280x0"
},
{
"height": 1920,
"type": "w",
"width": 2560,
"url": "https://sun9-38.userapi.com/s/v1/if2/-2rc3gmkRtrfvlX4UU2Uq6y50dNxlKvsD60kV6ZVyCbQUNZd8j1KqpNQMgyWm0kOj5UTFdvunOUOPDqDFrguizwQ.jpg?quality=96&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=2560x0"
},
{
"height": 81,
"type": "o",
"width": 108,
"url": "https://sun9-38.userapi.com/s/v1/if2/-2rc3gmkRtrfvlX4UU2Uq6y50dNxlKvsD60kV6ZVyCbQUNZd8j1KqpNQMgyWm0kOj5UTFdvunOUOPDqDFrguizwQ.jpg?quality=96&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=108x0"
},
{
"height": 180,
"type": "p",
"width": 240,
"url": "https://sun9-38.userapi.com/s/v1/if2/-2rc3gmkRtrfvlX4UU2Uq6y50dNxlKvsD60kV6ZVyCbQUNZd8j1KqpNQMgyWm0kOj5UTFdvunOUOPDqDFrguizwQ.jpg?quality=96&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=240x0"
},
{
"height": 270,
"type": "q",
"width": 360,
"url": "https://sun9-38.userapi.com/s/v1/if2/-2rc3gmkRtrfvlX4UU2Uq6y50dNxlKvsD60kV6ZVyCbQUNZd8j1KqpNQMgyWm0kOj5UTFdvunOUOPDqDFrguizwQ.jpg?quality=96&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=360x0"
},
{
"height": 405,
"type": "r",
"width": 540,
"url": "https://sun9-38.userapi.com/s/v1/if2/-2rc3gmkRtrfvlX4UU2Uq6y50dNxlKvsD60kV6ZVyCbQUNZd8j1KqpNQMgyWm0kOj5UTFdvunOUOPDqDFrguizwQ.jpg?quality=96&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu&cs=540x0"
},
{
"height": 1920,
"type": "base",
"width": 2560,
"url": "https://sun9-38.userapi.com/s/v1/if2/-2rc3gmkRtrfvlX4UU2Uq6y50dNxlKvsD60kV6ZVyCbQUNZd8j1KqpNQMgyWm0kOj5UTFdvunOUOPDqDFrguizwQ.jpg?quality=96&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu"
}
],
"text": "",
"web_view_token": "1f28407a5dbedeb8c8",
"has_tags": false,
"orig_photo": {
"height": 1920,
"type": "base",
"url": "https://sun9-38.userapi.com/s/v1/if2/-2rc3gmkRtrfvlX4UU2Uq6y50dNxlKvsD60kV6ZVyCbQUNZd8j1KqpNQMgyWm0kOj5UTFdvunOUOPDqDFrguizwQ.jpg?quality=96&as=32x24,48x36,72x54,108x81,160x120,240x180,360x270,480x360,540x405,640x480,720x540,1080x810,1280x960,1440x1080,2560x1920&from=bu",
"width": 2560
}
}
]
}