# 上传图片
# 简要描述
上传图片,获取直连
# 请求URL
/api/uploadFile
# 请求头
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
Content-Type | string | multipart/form-data;boundary=....... | |
askKey | 是 | string | 此参数必传,验证app的令牌 |
sign | 否 | string | 此参数如果在app设置开启了验签是必传 |
time | 否 | string | 当开启验签时,此参数为必传 |
apiUserToken | 否 | string | 用户令牌 |
nonce | 否 | string | 随机字符串(当开启V3验签此参数必传,且2分钟内不允许重复) |
# 请求方式
- post
# 参数
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
img | 是 | file | 图片文件 |
# 请求示例
{
"img": file
}
1
2
3
4
2
3
4
# 返回示例
{
"code": "200",
"message": "",
"status": true,
"data": {
"img": "https://download.123pan.cn/123-pics/head-pic/1812458628.jpg?v=1&t=4817006202&s=a9dcc35925ae9f165edf34a2d759a53b"
},
"pc": null,
"time": null,
"sign": null
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
# 返回参数说明
参数名 | 类型 | 说明 |
---|---|---|
code | string | 状态码200成功403权限异常或登陆超时,500请求异常 |
status | int | 状态0删除1使用 |
data | json | 更新对象 |
img | string | 图片地址 |
# 备注
- 更多返回错误代码请看首页的错误代码描述