Skip to content

下载文件 (Download)

Method: GET

Endpoint:

/api/v1/files/{hash}

路径参数

参数 类型 说明
hash String 文件内容的 SHA-256

响应

返回文件二进制内容:

Content-Type: application/octet-stream
Content-Disposition: attachment; filename="<hash>"

文件不存在或不属于当前用户时返回:

{
  "error": "文件不存在",
  "code": "FILE_NOT_FOUND"
}

HTTP 状态码:404