diff --git a/app/assets/javascripts/registrar/application.coffee b/app/assets/javascripts/registrar/application.coffee index 9bafe168c..12a0f9d96 100644 --- a/app/assets/javascripts/registrar/application.coffee +++ b/app/assets/javascripts/registrar/application.coffee @@ -29,7 +29,7 @@ $(document).on 'page:change', -> $('.js-contact-form').trigger('restoreDefault') $('[data-legal-document]').each (i, fileInput)-> - minSize = 1 * 1024 # 100kB + minSize = 8 * 1024 # 8kB maxSize = 8 * 1024 * 1024; # 8 MB $(fileInput).closest('form').submit (e) -> if (files = fileInput.files).length diff --git a/app/models/legal_document.rb b/app/models/legal_document.rb index 42d8c6fcf..c22d98025 100644 --- a/app/models/legal_document.rb +++ b/app/models/legal_document.rb @@ -10,7 +10,7 @@ class LegalDocument < ActiveRecord::Base belongs_to :documentable, polymorphic: true - validates :body, length: { minimum: (1.37 * 1.4).ceil }, unless: :path + validates :body, length: { minimum: (1.37 * 8.kilobytes).ceil }, unless: :path before_create :add_creator before_save :save_to_filesystem