附件上传接口
服务描述
本接口可附件上传。
开发须知
调用本接口前,请先获取appId
服务地址
POST https://{您的专属域名}/workorder/openapi/v1/attachment/upload
请求参数
| 参数 |
位置 |
类型 |
是否必填 |
说明 |
| appId |
header |
String |
Y |
应用ID |
| timestamp |
header |
String |
Y |
时间戳,毫秒 |
| sign |
header |
String |
Y |
签名 |
| Content-Type |
header |
String |
Y |
application/json |
| orderId |
url地址栏 |
String |
Y |
工单ID |
| attachmentFile |
url地址栏 |
MultipartFile |
Y |
文件流 |
请求数据示例:
POST https://{您的专属域名}/workorder/openapi/v1/attachment/upload
返回结果
AttachmentVo说明
| 参数 |
类型 |
说明 |
| realName |
String |
附件名称 |
| extName |
String |
扩展名 |
| type |
int |
类型:1-图片;2-一般文件 |
| fileSize |
long |
原图大小,单位:byte |
| filePath |
String |
原文件路径 |
| mediumFilePath |
String |
中图路径 |
| thumbnailFilePath |
String |
小图路径 |
返回结果示例:
{
"code": "10000",
"message": "图片上传成功",
"data": {
"extName": "png",
"filePath": "53e904366003cad81a76133514c57311dec967af19cb39aa253fbdc72fe8d06c8c3dd5d8237eaf6d814e5300ddf622f9dcd98ba11d9b822ba28bbea39dec3dbe.png",
"fileSize": 13145,
"mediumFilePath": "53e904366003cad81a76133514c57311447298a39bfe5635a30111b2f123fa9feedfefd713cdb08bcdbd11a30809ab1cdcd98ba11d9b822ba28bbea39dec3dbe.png",
"realName": "2.png",
"thumbnailFilePath": "53e904366003cad81a76133514c57311963e7c37688f446b676c278753c12904b5994537ecb38861489150645470533fdcd98ba11d9b822ba28bbea39dec3dbe.png",
"type": 0
}
}
结果码说明
| 结果码 |
说明 |
| 10000 |
请求成功 |
| 20001 |
请求失败 |
| 21002 |
认证失败,请重新登录 |
FAQ: