gitlab-org--gitlab-foss/spec/controllers/concerns
Stan Hu 262b974123 Fix attachments not displaying inline with Google Cloud Storage
There were several issues:

1. With Google Cloud Storage, we can't override the Content-Type with
Response-Content-Type once it is set.  Setting the value to
`application/octet-stream` doesn't buy us anything. GCS defaults to
`application/octet-stream`, and AWS uses `binary/octet-stream`. Just remove
this `Content-Type` when we upload new files.

2. CarrierWave and fog-google need to support query parameters:
https://github.com/fog/fog-google/pull/409/files, https://github.com/carrierwaveuploader/carrierwave/pull/2332/files.
CarrierWave has been monkey-patched until an official release.

3. Workhorse also needs to remove the Content-Type header in the request
(ef80978ff8/internal/objectstore/object.go (L66)),
or we'll get a 403 error when uploading due to signed URLs not matching the headers.
Upgrading to Workhorse 6.1.0 for https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/297
will make Workhorse use the headers that are used by Rails.

Closes #49957
2018-09-05 17:01:54 -07:00
..
checks_collaboration_spec.rb Share collaboration check between view and presenter 2018-04-11 10:51:15 +02:00
continue_params_spec.rb Reuses InternalRedirect when possible 2018-05-04 13:54:43 +02:00
controller_with_cross_project_access_check_spec.rb Render a 403 when showing an access denied message 2018-06-05 10:29:27 +02:00
group_tree_spec.rb Preload ancestors after pagination when filtering 2018-07-06 14:09:36 +02:00
internal_redirect_spec.rb Backport InternalRedirect#sanitize_redirect 2018-06-14 09:02:32 +10:00
issuable_collections_spec.rb Set issuable_sort and diff_view cookies to secure when possible 2018-09-03 22:37:36 -07:00
lfs_request_spec.rb Find the LFS-objects for a fork within a the fork network 2017-11-03 14:59:47 +01:00
send_file_upload_spec.rb Fix attachments not displaying inline with Google Cloud Storage 2018-09-05 17:01:54 -07:00