HomePhabricator
Diffusion Comm c9de9966f13f

[web] Add function to upload media to Blob service

Description

[web] Add function to upload media to Blob service

Summary:
Web counterpart of D7649. This diff adds a function that calls all necessary endpoints to upload a media file to Blob service. It has 3 stages:

  1. Create a holder and assign it to a blob (identified by blob hash)
  2. If the blob content doesn't exist yet, upload it. Used the XMLHttpRequest call very similiar to the one in lib/utils/upload-blob.js
  3. When the above succeeds, upload blob metadata to keyserver

Depends on D7620, D7687

Test Plan: This function is called and tested in the next diff.

Reviewers: atul, marcin

Reviewed By: atul

Subscribers: ashoat, tomek

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

Details

Provenance
bartekAuthored on Apr 29 2023, 8:17 AM
Reviewer
atul
Differential Revision
D7689: [web] Add function to upload media to Blob service
Parents
rCOMM486d17f33f20: [native] Upload encrypted media to Blob service
Branches
Unknown
Tags
Unknown