From e33ffab835dc532cf2cd46451ef4dc804f376cc1 Mon Sep 17 00:00:00 2001 From: Jeremy Friesen Date: Tue, 19 Dec 2023 15:33:10 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Ensure=20:maxFileSize=20is=20int?= =?UTF-8?q?eger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prior to this commit, we were casting the value to string. However Hyrax attempts to do division on that string. See https://github.com/samvera/hyrax/blob/b7891b758411c59f71ff54212e0d250fcc47e35f/app/views/hyrax/base/_form_files.html.erb#L6-L15 --- app/models/concerns/account_settings.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/concerns/account_settings.rb b/app/models/concerns/account_settings.rb index 54d8df829..85e98fd5d 100644 --- a/app/models/concerns/account_settings.rb +++ b/app/models/concerns/account_settings.rb @@ -162,7 +162,7 @@ def reload_library_config Hyrax.config do |config| config.contact_email = contact_email config.geonames_username = geonames_username - config.uploader[:maxFileSize] = file_size_limit + config.uploader[:maxFileSize] = file_size_limit.to_i end Devise.mailer_sender = contact_email