gitlab-org--gitlab-foss/config/initializers/workhorse_multipart.rb
2016-12-23 18:28:46 +01:00

19 lines
427 B
Ruby

Rails.application.configure do |config|
config.middleware.use(Gitlab::Middleware::Multipart)
end
module Gitlab
module StrongParameterScalars
GITLAB_PERMITTED_SCALAR_TYPES = [::UploadedFile]
def permitted_scalar?(value)
super || GITLAB_PERMITTED_SCALAR_TYPES.any? { |type| value.is_a?(type) }
end
end
end
module ActionController
class Parameters
prepend Gitlab::StrongParameterScalars
end
end