Implement multipart form rewriting to support upload offloading
-
This parses multipart form data and saves all found files as files in TempPath. TempPath is received from Rails by calling authorize request. The rewritten multipart form data contains
file.path
where the temporary file is stored, andfile.name
the original name of file as stored in Content-Disposition. The temporary file is removed afterwards, if it's not consumed by GitLab Rails. If the body is not multipart, forward request. -
All artifacts downloads are offloaded by exposing X-Sendfile-Type extension.