Document and verify the high-quality preview HTTP contract
This commit is contained in:
@@ -68,7 +68,7 @@ export const apiDocuments:Record<string,readonly string[]>={
|
||||
"/api/preview": [
|
||||
"轻量图片预览",
|
||||
"GET, HEAD",
|
||||
"查询参数:source(必填,本站静态栅格图片路径,或 /api/media/<UUID>,可带 ?variant=poster;作为查询值时必须 URL 编码);width(可选,240 / 480 / 960 / 1280,默认 480)。不接受任意远程图片地址。支持 If-None-Match。",
|
||||
"查询参数:source(必填,本站静态栅格图片路径,或 /api/media/<UUID>,可带 ?variant=poster;作为查询值时必须 URL 编码);width(可选,240 / 480 / 960 / 1280,默认 480)。高清导出使用 profile=export 且 width=2160:WebP 质量95,不按常规缩略图预算缩小,不放大小原件;其他 profile 或尺寸组合返回400。不接受任意远程图片地址。支持 If-None-Match。",
|
||||
"WebP 图片;包含 ETag;缓存命中可返回 304;HEAD 无正文。",
|
||||
"GET /api/preview?source=%2Fapi%2Fmedia%2F<UUID>&width=480",
|
||||
"400:参数不合法;404:图片不存在;503:预览暂不可用。"
|
||||
|
||||
Reference in New Issue
Block a user