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?
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides
Edited by Francisco Javier López (ex-Gitlab)