summaryrefslogtreecommitdiff
path: root/app/controllers/concerns/uploads_actions.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-08 00:05:58 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-08 00:05:58 +0000
commit1adb4373ba840a9bc771a8c9196f7183fd98b2b8 (patch)
tree1d319351302054fb1ca2223ed4da467fb2078765 /app/controllers/concerns/uploads_actions.rb
parentc324100967bbdd3f2f0ca3406c9261d35e69f148 (diff)
downloadgitlab-ce-1adb4373ba840a9bc771a8c9196f7183fd98b2b8.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