此接口用于将图片进行智能压缩处理。
GET /<ObjectKey>?x-tos-process=image/slim,zlevel_<value> HTTP/1.1 Host: examplebucket-1250000000.vol.com Date: Wed, 28 Oct 2015 20:32:00 GMT Authorization: Content-Length: 64 [Object]
该请求使用的公共请求消息头,请参见公共参数。
名称 | 位置 | 参数类型 | 是否必选 | 示例值 | 说明 |
|---|---|---|---|---|---|
x-tos-process | Query | string | 是 | image/slim | 数据处理类型,取值为image/slim。 |
名称 | 参数类型 | 是否必选 | 示例值 | 说明 | |
|---|---|---|---|---|---|
zlevel | Query | int | 否 | 3 | 压缩程度,取值为 1-9,数值越大代表压缩程度越高,默认值为 3。 |
该请求返回的公共响应消息头,请参见公共参数。
返回结果图内容。
GET /<ObjectKey>?x-tos-process=image/slim,zlevel_<value> HTTP/1.1 Host: examplebucket-1250000000.vol.com Date: Wed, 28 Oct 2015 20:32:00 GMT Authorization: Content-Length: 64 [Object]
HTTP/1.1 200 OK Date: Sat, 07 Oct 2023 09:02:23 GMT Server: TosServer x-tos-id-2: 1e89f203jld00006-a444fd0 x-tos-request-id: 1e89f203b2d00006-a444ed0 Content-Length: 1024 // 结果图内容 [Object]