上传剪裁后的头像图片到当前登录用户的profile
Request
HTTP request
POST https://www.featapi.com/api/user/profile/avatar/
Parameters
无需添加参数。
Authorization
该请求需要授权以下scopes访问权限:
Scopes |
---|
user_profile |
For more information, see the authentication and authorization page.
Request body
In the request body, supply a User.profile resource with the following properties:
Property name | Value | Description | Notes |
---|---|---|---|
必填 | |||
avatar | 文件 | 上传剪裁后的头像图片 | 仅允许图片文件 |
Response
如果请求成功,该 API 返回当前登录用户的 User.Profile 个人信息数据在响应体信息中。
200 Upload successfully
{
"data": {
"uid": 7815769374283,
"username": "WenWei Yang",
"firstname": "WenWei",
"lastname": "Yang",
"commercial_sign": "这是commercial sign 商业标志",
"avatar": "https://10.0.10.117:8003/media/7815769374283/avatar/blob_Pb0mraD",
"orig_avatar": "https://10.0.10.117:8003/media/7815769374283/avatar/th_6d0E9Mt.jpeg",
"gender": 100,
"marriage": 100,
"mobile": "159*****100",
"dob": "1990-01-01",
"age": "29",
"name_order": 1,
"is_online": true,
"home_domain": "7815769374283",
"crop_info": {
"x": 49,
"y": 0,
"unit": "px",
"width": 210,
"aspect": 1,
"height": 210
},
"avatars": {
"path": "https://10.0.10.117:8003/media/7815769374283/avatar/blob_Pb0mraD",
"sizes": {
"sm": {
"width": 32,
"height": 32,
"path": "https://10.0.10.117:8003/media/sm/7815769374283/avatar/blob_Pb0mraD_32x32.JPEG"
},
"md": {
"width": 64,
"height": 64,
"path": "https://10.0.10.117:8003/media/md/7815769374283/avatar/blob_Pb0mraD_64x64.JPEG"
},
"lg": {
"width": 300,
"height": 300,
"path": "https://10.0.10.117:8003/media/lg/7815769374283/avatar/blob_Pb0mraD_300x300.JPEG"
}
}
}
}
}