curl "https://api.scanova.io/media/allowed-files/?file_type=image"
[
{
"file_type": "image",
"extensions": ["png", "jpg", "jpeg", "gif", "svg"],
"mime_types": ["image/png", "image/jpeg", "image/gif", "image/svg+xml"],
"file_size": 5242880
}
]
媒体库
列出允许的文件类型
GET /media/allowed-files/
GET
/
media
/
allowed-files
/
curl "https://api.scanova.io/media/allowed-files/?file_type=image"
[
{
"file_type": "image",
"extensions": ["png", "jpg", "jpeg", "gif", "svg"],
"mime_types": ["image/png", "image/jpeg", "image/gif", "image/svg+xml"],
"file_size": 5242880
}
]
在管理 API 主机 (
在调用上传文件之前,使用此接口在客户端验证文件 ——
api.scanova.io) 上列出文件上传时可接受的扩展名、MIME 类型和大小限制。
GET https://api.scanova.io/media/allowed-files/
无需身份验证。
string
要筛选的以逗号分隔的类别(
image、video、audio、pdf、doc、script)。省略则返回所有类别。curl "https://api.scanova.io/media/allowed-files/?file_type=image"
[
{
"file_type": "image",
"extensions": ["png", "jpg", "jpeg", "gif", "svg"],
"mime_types": ["image/png", "image/jpeg", "image/gif", "image/svg+xml"],
"file_size": 5242880
}
]
file_size 以字节为单位。请注意,如果账户拥有自定义的计划配额 DOCUMENT_FILE_SIZE,pdf/doc 类别实际生效的限制可能高于或低于此处列出的值;此端点报告的是静态默认值。
相关内容
授权
Send your Management API key as the raw value of the Authorization header — no "Bearer " or "Token " prefix, and no other characters. Example: Authorization: 401f7ac837da42b97f613d789819ff93537bee6a. A header containing more than one space-separated part is rejected outright. Requests also require the request's Host header to be the management API host (e.g. api.scanova.io) — the same key sent to the regular API host will not authenticate.
查询参数
Comma-separated categories (image, video, audio, pdf, doc, script) to filter to; omit for all.
响应
200 - application/json
Array of allowed-type definitions.
此页面对您有帮助吗?