mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 08:03:40 +08:00
Improve handling of file params in lograge.
This commit is contained in:
parent
a755ff7b35
commit
9b18ee4bba
|
@ -46,7 +46,16 @@ if (Rails.env.production? && SiteSetting.logging_provider == 'lograge') || ENV["
|
|||
exceptions = %w(controller action format id)
|
||||
|
||||
params = event.payload[:params].except(*exceptions)
|
||||
params[:files].map!(&:headers) if params[:files]
|
||||
|
||||
if (file = params[:file]) && file.respond_to?(:headers)
|
||||
param[:file] = file.headers
|
||||
end
|
||||
|
||||
if (files = params[:files])
|
||||
params[:files] = files.map do |file|
|
||||
file.respond_to?(:headers) ? file.headers : file
|
||||
end
|
||||
end
|
||||
|
||||
output = {
|
||||
params: params.to_query,
|
||||
|
|
Loading…
Reference in New Issue
Block a user