13. 【公共】文件上传下载
13.1. 上传收藏内容
URL: /file/uploadFavorite
Type: POST
Author: Timothy
Content-Type: multipart/form-data
Description: 上传收藏内容
Body-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
file |
file |
No comments found. |
false |
- |
Request-example:
curl -X POST -H "Content-Type: multipart/form-data" -F 'file=' -i '/file/uploadFavorite'
13.2. 上传文档
URL: /file/uploadDocument
Type: POST
Author: Timothy
Content-Type: multipart/form-data
Description: 上传文档
Body-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
file |
file |
No comments found. |
false |
- |
Request-example:
curl -X POST -H "Content-Type: multipart/form-data" -F 'file=' -i '/file/uploadDocument'
13.3. 上传图像
URL: /file/uploadImage
Type: POST
Author: Timothy
Content-Type: multipart/form-data
Description: 上传图像
Body-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
file |
file |
No comments found. |
false |
- |
Request-example:
curl -X POST -H "Content-Type: multipart/form-data" -F 'file=' -i '/file/uploadImage'
13.4. 上传照片(消息专用)
URL: /file/uploadPhoto
Type: POST
Author: Timothy
Content-Type: multipart/form-data
Description: 上传照片(消息专用)
Body-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
file |
file |
No comments found. |
false |
- |
Request-example:
curl -X POST -H "Content-Type: multipart/form-data" -F 'file=' -i '/file/uploadPhoto'
Response-fields:
Field | Type | Description | Since |
---|---|---|---|
mapKey |
object |
图像文件Bean |
- |
└─uuid |
string |
UUID |
- |
└─type |
string |
扩展名 |
- |
└─sourceName |
string |
源文件名 |
- |
└─filename |
string |
存储的文件名 |
- |
└─path |
string |
相对路径 |
- |
└─uri |
string |
相对地址 |
- |
└─width |
int32 |
图像宽度 |
- |
└─height |
int32 |
图像高度 |
- |
└─size |
int32 |
文件大小 |
- |
Response-example:
{
"mapKey": {
"uuid": "",
"type": "",
"sourceName": "",
"filename": "",
"path": "",
"uri": "",
"width": 0,
"height": 0,
"size": 0
}
}
13.5. 上传用户头像
URL: /file/uploadAvatar
Type: POST
Author: Timothy
Content-Type: multipart/form-data
Description: 上传用户头像
Body-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
file |
file |
No comments found. |
false |
- |
Request-example:
curl -X POST -H "Content-Type: multipart/form-data" -F 'file=' -i '/file/uploadAvatar'
13.6. 文件下载
URL: /file/download
Type: GET
Author: Timothy
Content-Type: application/x-www-form-urlencoded
Description: 文件下载
Query-parameters:
Parameter | Type | Description | Required | Since |
---|---|---|---|---|
uri |
string |
No comments found. |
false |
- |
Request-example:
curl -X GET -i '/file/download?=b323rq'
Response-example:
Return void.