summaryrefslogtreecommitdiff
path: root/app/controllers/concerns/uploads_actions.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-18 12:06:03 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-18 12:06:03 +0000
commit16d9f66e9651d35b52e5a167789befe7b861292c (patch)
tree38ffe73aeffa5bc8ceaa3357db302edce6d874f6 /app/controllers/concerns/uploads_actions.rb
parent5333cb6c7c960aac58af40c898c87d050d829383 (diff)
downloadgitlab-ce-16d9f66e9651d35b52e5a167789befe7b861292c.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/concerns/uploads_actions.rb')
-rw-r--r--app/controllers/concerns/uploads_actions.rb17
1 files changed, 0 insertions, 17 deletions
diff --git a/app/controllers/concerns/uploads_actions.rb b/app/controllers/concerns/uploads_actions.rb
index 023c41821da..b87779c22d3 100644
--- a/app/controllers/concerns/uploads_actions.rb
+++ b/app/controllers/concerns/uploads_actions.rb
@@ -1,16 +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_request_format_from_path_extension
- end
-
def create
uploader = UploadService.new(model, params[:file], uploader_class).execute
@@ -69,18 +64,6 @@ module UploadsActions
private
- # From ActionDispatch::Http::MimeNegotiation. We have an initializer that
- # monkey-patches this method out (so that repository paths don't guess a
- # format based on extension), but we do want this behaviour when serving
- # uploads.
- def set_request_format_from_path_extension
- path = request.headers['action_dispatch.original_path'] || request.headers['PATH_INFO']
-
- if match = path&.match(/\.(\w+)\z/)
- request.format = match.captures.first
- end
- end
-
def uploader_class
raise NotImplementedError
end