Skip to content

feat: Implement profile picture storage & upload endpoint #2

@ryanpolasky

Description

@ryanpolasky

Description

A user may want to upload, update, and display a profile picture to personalize their profile. This feature requires implementing the backend logic for handling user profile picture uploads. The process should involve receiving an image file, uploading it to Firebase Storage, and then saving the public URL of that image to the user's profile in the PostgreSQL database.

Criteria

  • An API endpoint is created to handle profile picture uploads for a specific user & depends on the user being signed in.
  • When an image is sent to the endpoint, it is successfully uploaded to our Firebase Storage bucket.
  • Upon successful upload, the public URL returned by Firebase is saved in the profile_picture_url column in the user_profiles table for the corresponding user.
  • The endpoint should also handle updating an existing profile picture by replacing the old file in Firebase Storage.
  • The user's profile data, when fetched, should include the correct profile_picture_url.
  • Add basic validation for file size and type (e.g., JPEG, PNG).

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions