summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2018-11-30 12:55:22 +0100
committerDouwe Maan <douwe@selenight.nl>2018-12-03 12:29:02 +0100
commit31a4b268bb9dc9868a7f615d9ca6c3dc7699ab28 (patch)
tree9f23d0fe3d96c18e0913496967be6a4c38da14ea /app/controllers
parent19ad2a4987c3ce8d15b9f778333701597252855f (diff)
downloadgitlab-ce-31a4b268bb9dc9868a7f615d9ca6c3dc7699ab28.tar.gz
Revert "Rails5 fix format in uploads actions"
This reverts commit 4f76d953ddb44babe87c74be7e88018bd2e9aaa3.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/concerns/uploads_actions.rb13
1 files changed, 0 insertions, 13 deletions
diff --git a/app/controllers/concerns/uploads_actions.rb b/app/controllers/concerns/uploads_actions.rb
index 7a1c7abfb8f..5912fffc058 100644
--- a/app/controllers/concerns/uploads_actions.rb
+++ b/app/controllers/concerns/uploads_actions.rb
@@ -1,17 +1,11 @@
# frozen_string_literal: true
module UploadsActions
- extend ActiveSupport::Concern
-
include Gitlab::Utils::StrongMemoize
include SendFileUpload
UPLOAD_MOUNTS = %w(avatar attachment file logo header_logo favicon).freeze
- included do
- prepend_before_action :set_html_format, only: :show
- end
-
def create
link_to_file = UploadService.new(model, params[:file], uploader_class).execute
@@ -61,13 +55,6 @@ module UploadsActions
private
- # Explicitly set the format.
- # Otherwise rails 5 will set it from a file extension.
- # See https://github.com/rails/rails/commit/84e8accd6fb83031e4c27e44925d7596655285f7#diff-2b8f2fbb113b55ca8e16001c393da8f1
- def set_html_format
- request.format = :html
- end
-
def uploader_class
raise NotImplementedError
end