~~~[api:needAuth]
post:/index/Orders/upload
*file:file#附件文件
<<<
success
{
"code": 0,
"msg": "上传成功",
"data": {
"user_id": 2,
"orders_id": 0,
"name": "0c009df9b3a32c48442ecb1c5db065f4.png",
"mime": "image\/png",
"ext": "png",
"hash": "626557fdf5e74e4f0f6556554cabaff675ff87b9",
"size": 871766,
"path": "\/storage\/orders\/2\/0c009df9b3a32c48442ecb1c5db065f4.png",
"id": "2"
}
}
<<<
error
{
"code": 1,
"msg": "请上传文件"
}
~~~
### 字段信息
| 场景名 | 备注 |
| --- | --- |
| id | 附件ID |
| name | 文件名称 |
| mime | 文件MIME |
| ext | 扩展名 |
| hash | 哈希值 |
| size | 大小 |
| path | 路径 |