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)
Thu, Sep 26, 11:14 PM
Unknown Object (File)
Thu, Sep 26, 8:35 AM
Unknown Object (File)
Wed, Sep 18, 5:10 PM
Unknown Object (File)
Sep 14 2024, 11:47 PM
Unknown Object (File)
Sep 14 2024, 11:47 PM
Unknown Object (File)
Sep 14 2024, 11:46 PM
Unknown Object (File)
Sep 14 2024, 11:44 PM
Unknown Object (File)
Sep 9 2024, 9:09 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