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

Download and Process User Profile Image #406

@DennisAlund

Description

@DennisAlund

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

  1. 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.
  2. 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.

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

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions