Appearance
File upload
POST
v1/api/user
Request
name | necessary | type | default | describe |
---|---|---|---|---|
file | true | file | - | 文件(file) |
prefix | false | string | - | 存储文件夹路径(storage folder path) |
Response data struct
name | necessary | type | default | describe |
---|---|---|---|---|
code | true | int | - | 错误码(error code) |
message | true | string | - | 错误信息(error message) |
cause | true | string | - | 错误原因(error cause) |
details | true | object | - | 详情(details) |
-url | true | string | - | 链接(url) |
Example
- Body of form-data:
key | value |
---|---|
file | xxx.jpeg |
prefix | user |
- Header:
key | value |
---|---|
x-api-key | your's key value |
- Response body:
json
{
"code": 0,
"message": "Success",
"cause": "",
"details": {
"url": "https://xxx.com/user/avatar/20220814142433a6f4GbYB.png"
}
}
{
"code": 0,
"message": "Success",
"cause": "",
"details": {
"url": "https://xxx.com/user/avatar/20220814142433a6f4GbYB.png"
}
}