Skip to main content
GET
/
files
/
{file_id}
/
preview
This response does not have an example.

Authorizations

Authorization
string
header
required

API-Key 鉴权。所有 API 请求都应在 Authorization HTTP Header 中包含你的 API-Key,格式为:Bearer {API_KEY}。强烈建议开发者把 API-Key 放在后端存储,而非客户端,以免泄露。

Path Parameters

file_id
string<uuid>
required

要预览的文件的唯一标识符,从文件上传API响应中获取。

Query Parameters

as_attachment
boolean
default:false

是否强制作为附件下载文件。默认为false(在浏览器中预览)。

Response

文件内容成功返回。根据文件类型和请求参数设置响应头。

The response is of type file.