Page MenuHomePhabricator

[native] Fix encrypted media upload failures
ClosedPublic

Authored by bartek on Aug 5 2023, 10:33 AM.
Tags
None
Referenced Files
F2175087: D8738.id29567.diff
Wed, Jul 3, 1:55 AM
F2168311: D8738.id.diff
Tue, Jul 2, 8:55 AM
Unknown Object (File)
Mon, Jul 1, 7:26 PM
Unknown Object (File)
Mon, Jul 1, 2:46 AM
Unknown Object (File)
Sat, Jun 29, 3:34 PM
Unknown Object (File)
Fri, Jun 14, 3:20 AM
Unknown Object (File)
Wed, Jun 12, 6:46 AM
Unknown Object (File)
Mon, Jun 10, 7:24 PM
Subscribers

Details

Summary

Fixes ENG-4566. Issue details are in the task.

Previously, temporary encrypted file was created in the same directory as original. This diffs moves it to the app cache dir.

Test Plan

Ensured that encrypted media are successfully uploaded on both iOS (physical device) and Android. Also ensured that it is properly disposed after upload.

Console logged modified paths to confirm that they're correctly costructed in the app cache dir:

{
  "destinationPath": "/Users/barthap/Library/Developer/CoreSimulator/Devices/4BFD741A-64AB-4720-8125-3874478D8B4B/data/Containers/Data/Application/64F264B3-A8CF-4237-9B72-A2EFCE8B8A73/tmp/IMG_0011.dat",
  "destinationURI":"file:///Users/barthap/Library/Developer/CoreSimulator/Devices/4BFD741A-64AB-4720-8125-3874478D8B4B/data/Containers/Data/Application/64F264B3-A8CF-4237-9B72-A2EFCE8B8A73/tmp/IMG_0011.dat",
  "originalFilename":"IMG_0011.PNG",
  "targetFilename":"IMG_0011.dat",
  "uri":"file:///Users/barthap/Library/Developer/CoreSimulator/Devices/4BFD741A-64AB-4720-8125-3874478D8B4B/data/Media/DCIM/100APPLE/IMG_0011.PNG"
}

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Aug 5 2023, 10:56 AM
This revision is now accepted and ready to land.Aug 5 2023, 12:09 PM

Glad we caught this before the feature shipped!! Testing within the Comm community was a great test plan for this one