-
Notifications
You must be signed in to change notification settings - Fork 41
Labels
platform:backendBackend / cloud functionsBackend / cloud functionspriority:low 🏖️Low priority issueLow priority issuetype:enhancement 😃New feature or requestNew feature or request
Milestone
Description
Description
This issue involves downloading the user profile image from the Firebase Auth object (if it exists) and uploading it to the cloud storage path /tanam-users/{uid}/new-profile-image
. Additionally, create a Cloud Function trigger that processes the uploaded image, resizes it, and stores it as a PNG file.
Tasks
-
Download User Profile Image:
- Check if the user has a profile image in the Firebase Auth object.
- If a profile image exists, download the image.
- Upload the image to the cloud storage path
/tanam-users/{uid}/new-profile-image
.
-
Create Cloud Function Trigger:
- Create a Cloud Function trigger that activates when an image is uploaded to the path
/tanam-users/{uid}/new-profile-image
. - The trigger should process the image, converting it to a PNG format.
- Resize the image to fit within a 1024x1024 pixel square box while maintaining the aspect ratio.
- Store the processed image in the cloud storage path
/tanam-users/{uid}/profile.png
. - Delete the original file located at
/tanam-users/{uid}/new-profile-image
.
- Create a Cloud Function trigger that activates when an image is uploaded to the path
Acceptance Criteria
- The user profile image is successfully downloaded from the Firebase Auth object (if it exists) and uploaded to the specified path in cloud storage.
- A Cloud Function trigger is created and correctly processes the uploaded image.
- The image is resized to fit within a 1024x1024 pixel square box and saved in PNG format.
- The processed image is stored at
/tanam-users/{uid}/profile.png
. - The original image at
/tanam-users/{uid}/new-profile-image
is deleted after processing.
Metadata
Metadata
Assignees
Labels
platform:backendBackend / cloud functionsBackend / cloud functionspriority:low 🏖️Low priority issueLow priority issuetype:enhancement 😃New feature or requestNew feature or request
Type
Projects
Status
Done