35. 上传图片
开发中POST
/upload/image请求参数
Header 参数
Access-Token
string
必需
示例值:
1741f74aed758a688515f72572dc8e37
platform
string
必需
示例值:
H5
Body 参数multipart/form-data
file
string
图片文件对象
示例值:
(binary)
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
object {0}
示例
{
"status": 200,
"message": "图片上传成功",
"data": {
"fileInfo": {
"channel": 20,
"storage": "local",
"domain": "",
"file_name": "k2.jpg",
"file_path": "10001/20230324/109bc09e0155dab1f8e97993f6a1f9cb.jpg",
"file_size": 2492,
"file_ext": "jpg",
"file_type": 10,
"uploader_id": 10003,
"update_time": "2023-03-24 09:20:38",
"file_id": "10307",
"preview_url": "http://cba.itlike.com/public/uploads/10001/20230324/109bc09e0155dab1f8e97993f6a1f9cb.jpg",
"external_url": "http://cba.itlike.com/public/uploads/10001/20230324/109bc09e0155dab1f8e97993f6a1f9cb.jpg"
}
}
}
最后修改时间: 2 年前