这是indexloc提供的服务,不要输入任何密码
Skip to content

Issue 406: user image downloading / uploading #409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 30, 2024

Conversation

DennisAlund
Copy link
Member

  1. Download User Profile Image:

    • Checked if the user has a profile image in the Firebase Auth object.
    • Downloaded the profile image if it exists.
    • Uploaded the image to the cloud storage path /tanam-users/{uid}/new-profile-image.
  2. Create Cloud Function Trigger:

    • Created a Cloud Function trigger that activates when an image is uploaded to the path /tanam-users/{uid}/new-profile-image.
    • The trigger processes the image, converts it to PNG format.
    • Resizes the image to fit within a 1024x1024 pixel square box while maintaining the aspect ratio.
    • Stores the processed image in the cloud storage path /tanam-users/{uid}/profile.png.
    • Deletes the original file located at /tanam-users/{uid}/new-profile-image.

Acceptance Criteria Met

  • 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.

Closing #406

image

@DennisAlund DennisAlund added this to the User management milestone Jul 29, 2024
@DennisAlund DennisAlund requested a review from muzanella11 July 29, 2024 08:35
@DennisAlund DennisAlund self-assigned this Jul 29, 2024
Copy link

Visit the preview URL for this PR (updated for commit 3be3719):

https://tanam-testing--pr409-issue-406-user-image-2xe0vpyp.web.app

(expires Mon, 05 Aug 2024 08:38:08 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 5bbe8a1a68d9684d656bffba10008fe532204561

@DennisAlund DennisAlund linked an issue Jul 29, 2024 that may be closed by this pull request
5 tasks
Copy link
Contributor

@muzanella11 muzanella11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@muzanella11 muzanella11 merged commit f38663e into milestone/4-user-management Jul 30, 2024
3 checks passed
@muzanella11 muzanella11 deleted the issue/406-user-image branch July 30, 2024 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Download and Process User Profile Image
2 participants