UploadedFile: add support for all hash types sent by Workhorse
Summary
Follow-up of gitlab-workhorse#294 (comment 415151114).
UploadedFile
should support all hash types that workhorse send:
md5
sha1
-
sha256
(already implemented) sha512
Improvements
By supporting those hash types, API devs can then directly read them from the UploadedFile
set by multipart.rb
instead of reading them from the request parameters.
Risks
Involved components
Hashes of the uploads have been seen to be used in:
- CI job artifacts uploads
- Packages uploads (Maven in particular)
- LFS objects
- Project import uploads (although they don't seem to be read)
Edited by David Fernandez