Clear Content-Type metadata in Google Cloud Storage file attachments
Now that https://gitlab.com/gitlab-org/gitlab-ce/issues/49957 is closed and appears to be working in staging, we need to clear out the Content-Type header (which all should be application/octet-stream) for old attachments to be displayed properly in the browser. Unlike with AWS, the Response-Content-Type header doesn't override an existing Content-Type if it is predefined in Google. From https://cloud.google.com/storage/docs/access-control/signed-urls#string-components:
Note: Query String Parameters like response-content-disposition and response-content-type are not verified by the signature. To force a Content-Disposition or Content-Type in the response, set those parameters in the object metadata using gsutil or the XML/JSON API.
One way we can do this is via gsutil (https://cloud.google.com/storage/docs/gsutil/addlhelp/WorkingWithObjectMetadata). That doesn't give our customers an out-of-the-box solution, but the alternative is to iterate through all Upload entries and use CarrierWave/Fog to update the metadata (https://github.com/carrierwaveuploader/carrierwave/wiki/Saving-Content-Type).
/cc: @ahanselka, @mkozono, @mbergeron