Appearance
功能概述
文件上传
接口访问
接口地址
common/upload
请求方式 Method
POST
Header - Authorization Type : Bearer Token
| 属性 | 类型 | 长度 | 必填 | 默认值 | 说明 | 访问版本 |
|---|---|---|---|---|---|---|
| token | string | 32 | true | 用户身份标识令牌 | - |
请求参数
| 属性 | 类型 | 长度 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
| file | file | true | 上传文件信息 |
返回值
| 属性 | 类型 | 必填 | 说明 |
|---|---|---|---|
| imageUrl | string | true | 文件地址信息 |
| fileName | string | true | 上传文件名称 |
| address | string | true | 地址信息 |
| upName | string | true | 文件名 |
| fileType | string | true | 文件类型 |
| fileSize | int | true | 文件大小 |
| imageID | int | true | 文件id,当文件过大时返回 |
返回示例
{
"response": {
"imageUrl": "https://file.pushhaa.com/jr4tvofstxxgupspihomv5fxu4xhx2a4.docx",
"fileName": "jr4tvofstxxgupspihomv5fxu4xhx2a4.docx",
"address": "https://file.pushhaa.com/",
"upName": "EAM系统操作手册.docx",
"fileType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"fileSize": 1842.4
},
"requestId": "33498c92-4969-4de2-8fb9-82cc5792b5d0"
}错误码
| 错误码 | 错误描述 | 解决思路 |
|---|---|---|
| 404 | Fail | 未知错误,请联系管理员 |
| fileUploadFailed | 文件上传失败 | 文件上传失败,请联系管理员 |
