Skip to content

Fixed bug with the content disposition with wiki attachments

What does this MR do?

Fixes a bug with the content disposition with wiki attachments.

Before https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21362 all the uploads to the wiki where handled by the UploadsController. Now that they are stored inside the wiki repo we are not using it anymore. Instead, we're using the old code in the WikisController#show.

By default, this code set the content disposition to inline and also sets the Content-Security-Policy headers, that's why files like pdf were failing to display.

In this MR we set the send the files using the send_blob mechanism.

What are the relevant issue numbers?

#52406 (closed)

Does this MR meet the acceptance criteria?

Merge request reports