Skip to content

Upload avatar image of current user

post/api/user/avatar
Upload user avatar image for the current logged-in user.

Request

Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.Example: Authorization: Bearer <token>

Body multipart/form-data

filestring
required
File object.

Response

Schema: application/json
codestring
dataundefined
messagestring

Body application/json

json
// SUCCESS

{
  "code": "0",
  "message": "Ok"
}
// SUCCESS

{
  "code": "0",
  "message": "Ok"
}
json
// UPLOAD_NO_FILE

{
  "code": "501",
  "message": "Upload no file"
}
// UPLOAD_NO_FILE

{
  "code": "501",
  "message": "Upload no file"
}
json
// UPLOAD_FILE_TYPE_NOT_ALLOW

{
  "code": "502",
  "message": "Upload file type not allow"
}
// UPLOAD_FILE_TYPE_NOT_ALLOW

{
  "code": "502",
  "message": "Upload file type not allow"
}