支持多文件上传,目前支持上传文件类型包含:png,jpg,jpeg,gif,bmp,flv,swf,mkv,avi,rm,rmvb,mpeg,mpg,ogg,ogv,mov,wmv,mp4,webm,mp3,wav,rar,zip,tar,gz,7z,bz2,iso,doc,docx,xls,xlsx,ppt,pptx,pdf,txt,log,sql,应许上传文件大小8M。
请求地址:
请求地址 | 请求方法 |
http://proxy-os.aimlt.com/cgibin/Upload/authUpload | POST |
公共参数:
无
请求参数
参数 | 类型 | 是否必填 | 最大长度 | 描述 | 示例值 |
link | String | 是 | 20 | 关联业务模块,详情《业务模块对照表》 | IDSysDoc |
ApiTicket | String | 是 | 600 | 用户临时身份票据,通过《获取用户身份临时票据》获得 |
|
attach | String | 否 | 256 | 附加参数,原样返回,需要进行URL编码在传给金康云 | form=myadmin&user=text |
返回示例
{
"errcode":"200",
"errmsg":"ok",
"list":[
{
"aid":"736d31d1fed8d827aa96b9d268a29132",
"filename":"cloud.png",
"filepath":"up/202001/8b0d0dea2256770fa69511fd1c8f9401.png",
"filesize":"15572",
"fileext":"png",
"isimage":"1",
"isvideo":"0",
"isaudio":"0",
"domain":"http://img01.aimlt.com/",
"attach":"aa%26bb"
}
]
}
返回参数说明
参数 | 描述 |
aid | 附件ID |
filename | 文件名 |
filepath | 文件路径 |
filesize | 文件大小,单位字节 |
aid | 附件ID |
fileext | 文件后缀名 |
isimage | 是否为图片文件,1是 |
isvideo | 是否为视频文件,1是 |
isaudio | 是否为音频文件,1是 |
domain | 域名 |
attach | 附加参数 |
异常示例
{"errcode":"100003","errmsg":"Failed to upload file"}
单文件上传参考示例:
提交
返回示例
{
"errcode":"200",
"errmsg":"ok",
"list":[
{
"aid":"736d31d1fed8d827aa96b9d268a29132",
"filename":"cloud.png",
"filepath":"up/202001/8b0d0dea2256770fa69511fd1c8f9401.png",
"filesize":"15572",
"fileext":"png",
"isimage":"1",
"isvideo":"0",
"isaudio":"0",
"domain":"http://img01.aimlt.com/",
"attach":"aa%26bb"
}
]
}
多文件上传参考示例:
提交
返回示例
{
"errcode":"200",
"errmsg":"ok",
"list":[
{
"aid":"588c3f90761ccf1adb6554d854843658",
"filename":"cloud.png",
"filepath":"up/202001/561e333a53e69d2968b86bf36616fd92.png",
"filesize":"15572",
"fileext":"png",
"isimage":"1",
"isvideo":"0",
"isaudio":"0",
"domain":"http://img01.aimlt.com/",
"attach":"aa%26bb"
},
{
"aid":"e71d70f689067bac48803208127243a4",
"filename":"icon.png",
"filepath":"up/202001/496fd12be4c7eebaba6147694fa67b4c.png",
"filesize":"90261",
"fileext":"png",
"isimage":"1",
"isvideo":"0",
"isaudio":"0",
"domain":"http://img01.aimlt.com/",
"attach":"aa%26bb"
}
]
}
多文件上传且不同的NAME参考示例:
提交
返回示例
{
"errcode":"200",
"errmsg":"ok",
"list":[
{
"aid":"d99c44831ae5229097932428c6ce6f0a",
"filename":"3d.png",
"filepath":"up/202001/2d5b33f8851b10eca5ba9f0c1a7c4c8e.png",
"filesize":"121554",
"fileext":"png",
"isimage":"1",
"isvideo":"0",
"isaudio":"0",
"domain":"http://img01.aimlt.com/",
"attach":"aa%26bb"
},
{
"aid":"d9a40c29da95c53562bc4c3cc5695f52",
"filename":"alipay.png",
"filepath":"up/202001/5228778a04f14afce34a5ca1d20f1e5e.png",
"filesize":"6194",
"fileext":"png",
"isimage":"1",
"isvideo":"0",
"isaudio":"0",
"domain":"http://img01.aimlt.com/",
"attach":"aa%26bb"
}
]
}