POST Upload File endpoint.
Endpoint
POST
/web/v1/system/files/upload WEBAuthentication
- Chain: WEB
- JWT Token: true
- API Key: false
- Permissions: ["file:write"]
Rate Limit
Standard rate limit applies.
Headers
Frontend Headers
| Header | Required | Description |
|---|---|---|
| X-LOCALE | Yes | 用户的 locale |
| Accept-Language | No | 语言偏好 |
Cloudflare Headers
| Header | Required | Description |
|---|---|---|
| CF-Connecting-IP | Yes | Client IP from Cloudflare |
| CF-IPCountry | Yes | Client country code |
| CF-Ray | Yes | Cloudflare Ray ID |
| CF-Visitor | Yes | Visitor scheme |
| CF-Worker | No | Cloudflare Worker indicator |
| CF-TCP-Port | No | Client TCP port |
| CF-Edge-Keep-Alive | No | Edge keep-alive status |
| CF-Cache-Status | No | Cache status |
| CDN-Loop | No | CDN loop detection |
| X-Real-IP | Yes | Real client IP |
Nginx Headers
| Header | Required | Description |
|---|---|---|
| X-PORTAL-ACCESS-CODE | Yes | Portal access code |
| X-Real-IP | Yes | 客户端真实 IP |
| X-Forwarded-For | Yes | 代理链 |
| X-Forwarded-Proto | Yes | 协议 |
Request Parameters
Body (multipart/form-data)
| Field | Type | Required | Description |
|---|---|---|---|
| file | MultipartFile | Yes | 上传的文件 |
| bucket | String | No | 存储桶 |
| remark | String | No | 文件备注 |
Response
200 OK
| Field | Type | Description |
|---|---|---|
| data.bizId | String | 文件业务ID |
| data.bucket | String | 存储桶 |
| data.objectKey | String | 对象键 |
| data.originalFilename | String | 原始文件名 |
| data.fileSize | long | 文件大小(字节) |
| data.contentType | String | 内容类型 |
| data.fileCategory | FileCategory | 文件分类 |
| data.accessUrl | String | 访问URL |
| data.etag | String | 文件哈希 |