diff --git a/app/models/bulk_export.rb b/app/models/bulk_export.rb index 680808f376..83e9758b69 100644 --- a/app/models/bulk_export.rb +++ b/app/models/bulk_export.rb @@ -102,7 +102,7 @@ def archive! end def generate_file_name - return if file_name.present? + return self.file_name = ActiveStorage::Filename.new(file_name).sanitized if file_name.present? self.file_name = "#{record_type&.pluralize}-#{Time.now.strftime('%Y%m%d.%M%S%M%L')}.#{exporter_type&.mime_type}" end