HomePhabricator
Diffusion Comm f86be566a289

[web] Introduce `useUploadAvatarMedia` to `AvatarHooks`

Description

[web] Introduce useUploadAvatarMedia to AvatarHooks

Summary:
This function is similar to useUploadProcessedMedia() in native/avatar-hooks. It basically lets us upload the File we receive from image input.

We consume useUploadAvatarMedia in EditUserAvatarMenu to upload the selected image. In subsequent diffs, we will update onImageSelected to handle the setting of the image avatar as well.

Test Plan:

  1. Select "Select image" from EditUserAvatarMenu
  2. Select an image from the file explorer
  3. Check the uploads table and observe that the image was uploaded:

086e26.png (1×3 px, 773 KB)

Reviewers: ashoat, ginsu

Reviewed By: ashoat

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D8724

Details

Provenance
atulAuthored on Aug 3 2023, 11:44 PM
Reviewer
ashoat
Differential Revision
D8724: [web] Introduce `useUploadAvatarMedia` to `AvatarHooks`
Parents
rCOMM27c7861c1042: [native] codeVersion -> 242
Branches
Unknown
Tags
Unknown