5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 07:56:23 +00:00

fix: métodos en disk_controller_decorator.rb #102

This commit is contained in:
maki 2024-06-06 16:24:16 -03:00
parent 628a5fedb2
commit 83b29bbd8a

View file

@ -11,7 +11,7 @@ module ActiveStorage
# Permitir incrustar archivos subidos (especialmente PDFs) desde # Permitir incrustar archivos subidos (especialmente PDFs) desde
# otros sitios. # otros sitios.
def show def show
original_show.tap do |s| original_show.tap do |_s|
response.headers.delete 'X-Frame-Options' response.headers.delete 'X-Frame-Options'
end end
end end
@ -57,7 +57,7 @@ module ActiveStorage
end end
def limits(max_upload_size, max_download_size) def limits(max_upload_size, max_download_size)
ruby_hash = { "max_upload_size": max_upload_size, "max_download_size": max_download_size } ruby_hash = { max_upload_size: max_upload_size, max_download_size: max_download_size }
json_string = JSON.generate(ruby_hash) json_string = JSON.generate(ruby_hash)
end end
@ -69,15 +69,15 @@ module ActiveStorage
def page_not_found(exception) def page_not_found(exception)
head :not_found head :not_found
ExceptionNotifier.notify_exception(exception, data: {params: params.to_hash}) ExceptionNotifier.notify_exception(exception, data: { params: params.to_hash })
end end
def max_upload_size def max_upload_size
max_upload_size_mbs = ENV['MAX_UPLOAD_SIZE'].to_i.megabytes ENV['MAX_UPLOAD_SIZE'].to_i.megabytes
end end
def max_download_size def max_download_size
max_download_size_mbs = ENV['MAX_DOWNLOAD_SIZE'].to_i.megabytes ENV['MAX_DOWNLOAD_SIZE'].to_i.megabytes
end end
end end
end end