src/common-ui/lib/common-ui/uploaded_file.rb
# Uploaded file must be of type ActionDispatch::Http::UploadedFile
Uploaded file must be of type ActionDispatch::Http::UploadedFile
Uploaded file must be of type ActionDispatch :: Http :: UploadedFile
def validate_extension
        return unless @allowed_extensions
        filename = @file.original_filename
        @allowed_extensions.each do |each|
          return if filename.end_with?(".#{each}")
        end
        raise I18n.t(
          "backup.error.invalid_extension", {
            :file => filename,
            :extensions => @allowed_extensions.join(", "),
            :count => @allowed_extensions.length
        })
      end
def validate_extension return unless @allowed_extensions filename = @file . original_filename @allowed_extensions . each do | each | return if filename . end_with? ( ".#{each}" ) end raise I18n . t ( "backup.error.invalid_extension" , { :file => filename , :extensions => @allowed_extensions . join ( ", " ) , :count => @allowed_extensions . length } ) end
Uploaded file must be of type ActionDispatch::Http::UploadedFile
Uploaded file must be of type ActionDispatch :: Http :: UploadedFile