Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 1.12 KB

UploadAvatar.md

File metadata and controls

52 lines (37 loc) · 1.12 KB

Upload user's avatar

This endpoint is used to upload avatar for user profile and returns the URL for the avatar image.

HTTP Request

POST musora-api/avatar/upload

Permissions

- Only authenticated user

Request Parameters

Type Key Required Notes
body file yes File upload

Request Example:

$.ajax({
    url: 'https://www.domain.com' +
        '/musora-api/avatar/upload',
    type: 'POST',
    success: function(response) {
        // handle success
    },
    error: function(response) {
        // handle error
    }
});

Response Example (200):

{
  "data": [
    {
      "url": "https://dzryyo1we6bm3.cloudfront.net/avatars/-1616052766-424855.jpg"
    }
  ]
}