Skip to content

Commit

Permalink
remove comma in uploaded filename due to full name containing comma
Browse files Browse the repository at this point in the history
  • Loading branch information
amtuannguyen committed Jan 16, 2025
1 parent 7fe418c commit fa73089
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,6 @@ def uploaded_filename(original_filename)
embargo_count = embargo_count + 1 if self.new_record?
file_sequence = "_#{self.document_type}_#{embargo_count}" if document_type == 'embargo'

return "#{full_name}_#{year}_#{deg_name}#{file_sequence}".gsub(/[\s\.]/, '_') + ext
return "#{full_name}_#{year}_#{deg_name}#{file_sequence}".gsub(/[\s\.\,]/, '_') + ext
end
end

0 comments on commit fa73089

Please sign in to comment.