5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 16:16:21 +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
# otros sitios.
def show
original_show.tap do |s|
original_show.tap do |_s|
response.headers.delete 'X-Frame-Options'
end
end
@ -57,7 +57,7 @@ module ActiveStorage
end
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)
end
@ -69,15 +69,15 @@ module ActiveStorage
def page_not_found(exception)
head :not_found
ExceptionNotifier.notify_exception(exception, data: {params: params.to_hash})
ExceptionNotifier.notify_exception(exception, data: { params: params.to_hash })
end
def max_upload_size
max_upload_size_mbs = ENV['MAX_UPLOAD_SIZE'].to_i.megabytes
ENV['MAX_UPLOAD_SIZE'].to_i.megabytes
end
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