thoughtbot / paperclip

Easy file attachment management for ActiveRecord
https://thoughtbot.com
Other
9.01k stars 2.43k forks source link

*_file_name attribute without extension #2705

Open SamarthMayya opened 1 year ago

SamarthMayya commented 1 year ago

When a model has a Paperclip attachment attached to it, a column named <attachment_name>_file_name is created in the model. Is is possible for a record to not have the file extension in this column when saved? For instance, suppose the attachment is document. Then the corresponding column in the database would be document_file_name. Can the value of this column be something like Report, instead of something like Report.pdf? If it was saved as the former, is there a way to serve this file with the extension?