Page MenuHomePhabricator

[blob] Support uploading base64-encoded blobs
ClosedPublic

Authored by bartek on Sep 27 2024, 7:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 10:02 AM
Unknown Object (File)
Wed, Dec 18, 10:02 AM
Unknown Object (File)
Wed, Dec 18, 10:02 AM
Unknown Object (File)
Wed, Dec 18, 10:01 AM
Unknown Object (File)
Wed, Dec 4, 4:12 PM
Unknown Object (File)
Nov 10 2024, 4:18 PM
Unknown Object (File)
Nov 8 2024, 3:02 AM
Unknown Object (File)
Nov 8 2024, 3:02 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
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #44640)

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 ↗(On Diff #44640)

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