Page MenuHomePhabricator

[native] Fix uploading images with ph-upload:// scheme
ClosedPublic

Authored by angelika on Thu, Apr 10, 5:50 PM.
Tags
None
Referenced Files
F6099860: D14566.diff
Mon, Apr 21, 8:39 AM
Unknown Object (File)
Sun, Apr 20, 1:01 PM
Unknown Object (File)
Fri, Apr 18, 11:36 PM
Unknown Object (File)
Thu, Apr 17, 12:17 PM
Unknown Object (File)
Thu, Apr 17, 5:29 AM
Unknown Object (File)
Wed, Apr 16, 5:06 PM
Unknown Object (File)
Wed, Apr 16, 5:00 PM
Unknown Object (File)
Wed, Apr 16, 3:55 PM
Subscribers

Details

Summary

https://linear.app/comm/issue/ENG-10531/unable-to-send-screenshots-in-latest-build

Related: D14512

Some images and videos on iOS have ph-upload:// scheme and they fail to be encrypted thus crashing the app. They work ok for processing though.
So we still use uri from image picker for processing but use local uri for encryption and upload.

Test Plan

Try to upload a couple of images on iOS: a screenshot, an image from a camera, a video from a camera etc.
Do the same for Android

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Thu, Apr 10, 11:41 PM

It seems like we're discarding the processed media, since we're returning uploadURI to the caller (non-processed media). I hope I'm missing something here, as both @angelika and @bartek did not flag this...

It seems like we're discarding the processed media, since we're returning uploadURI to the caller (non-processed media). I hope I'm missing something here, as both @angelika and @bartek did not flag this...

https://phab.comm.dev/D14574

That's right. There was a mistake here. During the review, I was comparing changes in this diff with changes from D14512 and I misunderstood changes to initialURI in that diff, making me think this diff is correct.