Page MenuHomePhabricator

[blob] Support uploading base64-encoded blobs
ClosedPublic

Authored by bartek on Sep 27 2024, 7:32 AM.
Tags
None
Referenced Files
F3409367: D13503.id44640.diff
Wed, Dec 4, 4:12 PM
Unknown Object (File)
Sun, Nov 10, 4:18 PM
Unknown Object (File)
Fri, Nov 8, 3:02 AM
Unknown Object (File)
Fri, Nov 8, 3:02 AM
Unknown Object (File)
Nov 2 2024, 2:41 AM
Unknown Object (File)
Nov 1 2024, 4:22 PM
Unknown Object (File)
Nov 1 2024, 5:35 AM
Unknown Object (File)
Oct 19 2024, 7:19 AM
Subscribers

Details

Summary

Address ENG-9413.

As an alternative to blob_data multipart form field, added a base64_data field which accepts base64-strings.

I could take advantage of multipart "field types" (MIME types for fields) and check type of existing blob_data but there's a risk that React Native fetch would not support it correctly, so went with a simple solution.

Test Plan

Tested on staging with D13495

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.Sep 27 2024, 7:34 AM
will added inline comments.
services/blob/src/http/handlers/blob.rs
174

Would we benefit from a match statement for base64 and blob_data cases here for clarity?

This revision is now accepted and ready to land.Sep 27 2024, 11:35 AM
services/blob/src/http/handlers/blob.rs
174

Good call, but it might be more indentation, so I prefer exiting early