Page MenuHomePhabricator

[native] Fix encrypted media upload on Android
ClosedPublic

Authored by ashoat on Aug 10 2024, 10:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 3:43 AM
Unknown Object (File)
Wed, Nov 20, 3:43 AM
Unknown Object (File)
Wed, Nov 20, 3:41 AM
Unknown Object (File)
Wed, Nov 20, 2:44 AM
Unknown Object (File)
Sat, Nov 2, 6:02 AM
Unknown Object (File)
Sat, Nov 2, 6:02 AM
Unknown Object (File)
Sat, Nov 2, 6:01 AM
Unknown Object (File)
Sat, Nov 2, 5:41 AM
Subscribers

Details

Summary

This addresses ENG-9015.

Test Plan

Confirm that upload of .dat files on Android no longer triggers the following error:

'upload failed', [Error: Failed to upload blob: guessContentTypeFromName(file.name) must not be null], undefined, undefined

Diff Detail

Repository
rCOMM Comm
Branch
ashoat/media
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

An alternate solution would potentially be to alter the file extension that the encryption logic uses for these files, either on Android or globally. I don't have a strong preference

bartek added inline comments.
native/input/input-state-container.react.js
1241–1249

I guess we could always add mimeType: 'application/octet-stream' to uploadOptions and skip that platform check. But this is also okay

This revision is now accepted and ready to land.Aug 11 2024, 1:27 AM
native/input/input-state-container.react.js
1241–1249

I think that would probably be better, but I'd rather not have to test it on iOS right now. Going to land as-is