object image.update(object/array images)
This method allows to update existing images.该方法允许更新现有的图像。
(object/array)
Image properties to be updated.要更新的图像属性。
The imageid
property must be defined for each image, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.必须为每个图像定义“image id”属性,所有其他属性都是可选的。 只有通过的属性将被更新,所有其他属性将保持不变。
Additionally to the standard image properties, the method accepts the following parameters.除了标准图像属性外,该方法接受以下参数。
属性 类 | 说明 | |
---|---|---|
image | string | Base64 encoded image. The maximum size of the encoded image is 1 MB. Base64编码图像。 编码图像的最大大小为1 MB。 |
(object)
Returns an object containing the IDs of the updated images under the imageids
property.返回包含“imageid”属性下更新的图像的ID的对象。
Rename image to "Cloud icon".将图像重命名为"Cloud icon"。
Request:
{
"jsonrpc": "2.0",
"method": "image.update",
"params": {
"imageid": "2",
"name": "Cloud icon"
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}
Response:
CImage::update() in frontends/php/include/classes/api/services/CImage.php.