跳转到主要内容
POST
/
files
/
upload
Error
A valid request URL is required to generate request examples
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "size": 123,
  "extension": "<string>",
  "mime_type": "<string>",
  "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": 123
}

授权

Authorization
string
header
必填

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

请求体

multipart/form-data
file
file
必填

要上传的文件。

user
string
必填

用户标识。

响应

文件上传成功。

文件上传成功响应。

id
string<uuid>

ID。

name
string

文件名。

size
integer

文件大小 (byte)。

extension
string

文件后缀。

mime_type
string

文件 mime-type。

created_by
string<uuid>

上传人 ID (应为 uuid,示例中为 int,已修正)。

created_at
integer<int64>

上传时间。