HomePhabricator
Diffusion Comm b58aba9be66c

[web] Generate thumbhash during photo upload

Description

[web] Generate thumbhash during photo upload

Summary:
This diff adds thumbhash creation step when uploading photos on web. The approach here is way simpler than on native. This works for both encrypted and non-encrypted media. The canvas code is based on this example code.

In contrast to native, we can use thumbhash npm package to avoid copying their code. Adding @ashoat because of this dependency

Test Plan: Selected a photo to upload on web, and verified in TablePlus that the upload contains the thumbHash string in the extras column. For encrypted media, it's significantly longer because it includes IV and other encryption metadata.

Reviewers: atul, ashoat

Reviewed By: ashoat

Subscribers: ashoat, tomek

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

Details

Provenance
bartekAuthored on May 15 2023, 8:00 AM
Reviewer
ashoat
Differential Revision
D7811: [web] Generate thumbhash during photo upload
Parents
rCOMMebdfde6841a5: [web] Introduce `CommunityCreationKeyserverLabel`
Branches
Unknown
Tags
Unknown