xHergz / TheMakeupApp

Capstone project for SET
0 stars 0 forks source link

Http 500 status when trying to create client profile with no picture #96

Closed xHergz closed 5 years ago

xHergz commented 5 years ago

Description:

When trying to create a new client profile with no profile picture, the server fails to upload the image (Empty image, no image type, invalid image error) and returns a 500.

Reproduction Steps:

  1. Log in with account that does not have client profile
  2. Go to client profile page
  3. Fill in bio but dont select a picture
  4. Create

    Proposed Solution:

    When the app sends an empty profile picture to the api, use the default picture url. This will have to be done on the API size because the API will try to upload anything that comes to it and generate its own url.

xHergz commented 5 years ago

Fixed by checking for an empty or null picture and using the default profile pic path instead.