Page MenuHomePhabricator

[web] Encrypt media before uploading
ClosedPublic

Authored by bartek on Apr 3 2023, 2:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 27, 8:56 PM
Unknown Object (File)
Sat, Apr 27, 8:56 PM
Unknown Object (File)
Sat, Apr 27, 8:56 PM
Unknown Object (File)
Sat, Apr 27, 8:54 PM
Unknown Object (File)
Sat, Apr 27, 8:31 PM
Unknown Object (File)
Tue, Apr 16, 10:04 AM
Unknown Object (File)
Mon, Apr 15, 6:55 PM
Unknown Object (File)
Mon, Apr 15, 3:45 PM
Subscribers

Details

Summary

This is the final diff that adds support for uploading encrypted media.

Media support in web input-state-container works differently but it's as complicated as on native. Basically: firstly, we create a pendingUpload and enhance it with actual upload result. Then (when enter/send btn is clicked) we create message based on that pending upload.

Similiar to native version, the encrypted uploads functionality is hidden behind a boolean.

Depends on D7291, D7292, D7293, D7295

Test Plan

Set the sendEncryptedMedia to false. Send a photo/video/multiple media - confirm it works.
Set the flag to true. Repeat.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Apr 4 2023, 12:21 AM

For encryption both enabled and disabled, send a photo and confirm it works. Refresh the website to reload from keyserver.

I'm sure you tested this stack thoroughly, but generally would be good to put some more specifics on scenarios you tested in the Test Plan to give reviewers a bit more confidence. For example, did you test sending multiple encrypted photos at the same time?

Maybe a few screenshots/screen recordings to demonstrate expected behavior would also be a nice touch (though not strictly necessary)

web/input/input-state-container.react.js
305–323 ↗(On Diff #24587)

Same feedback as previous diffs where it might improve readability to "handle the easy case first."

899–910 ↗(On Diff #24587)

Sorry to keep adding changes that you'll need to rebase and make, but let's handle the "easy case first" here as well.

This revision is now accepted and ready to land.Apr 4 2023, 10:19 AM
This revision was automatically updated to reflect the committed changes.