FIX: Capture S3 metadata when calling create_multipart (PR #14161)

The generate_presigned_put endpoint for direct external uploads (such as the one for the uppy-image-uploader) records allowed S3 metadata values on the uploaded object. We use this to store the sha1-checksum generated by the UppyChecksum plugin, for later comparison in ExternalUploadManager.

However, we were not doing this for the create_multipart endpoint, so the checksum was never captured and compared correctly.

Also includes a fix to make sure UppyChecksum is the last preprocessor to run. It is important that the UppyChecksum preprocessor is the last one to be added; the preprocessors are run in order and since other preprocessors may modify the file (e.g. the UppyMediaOptimization one), we need to checksum once we are sure the file data has “settled”.



I knew there would be a better way! Thanks

Actually I had to use permit to convert to a hash anyway from ActionController::Parameters so I used that instead of slice