Skip to content

Allow object storage acceleration from JSON encoded body

This issue originates from gitlab-org/gitlab-ce#63097

Our NPM package doesn't have workhorse upload acceleration, and members of the wider community are contributing new features based on that https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9012#note_179607151

The reason being is that we don't have a body hijacking handler for JSON encoded requests.

What happens with these kinds of uploads is that a file is provided in base64 encoding inside the JSON body.

This is how we handle NPM Object Storage uploading on rails side.

Proposal

We should implement a handler that can hijack JSON encoded body, stripping base64 encoded files and replacing them with the usual metadata workhorse generates on upload acceleration.

/cc @marin @dzaporozhets