Skip to content

Implement ProfilePictureUpload Command object #37

@cspath1

Description

@cspath1

This command will be used to upload a new profile picture for a User. It will need a data class (called Request) that has the following parameters:

  • User Id
  • Multipart File

The command should check that the user id refers to a valid user record. If this validation fails, we should respond with a HashMultimap<ErrorTag, String> as a failure data type

Otherwise, it should check to see if the user already has a profile picture uploaded, and if so, it should call a separate S3 service to delete this image. It should then call an S3 upload service to upload the new image. If the image is uploaded successfully, the ProfilePicture record associated with the User should be retrieved and updated. A boolean marked true should be returned as the success data type.

If the aforementioned image upload is not successful, we should respond with the errors the S3 upload service returned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    profile-pictureProfilePicture Entity-specific

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions