Enable :preserve_files in paperclip config [SCI-1626]

This commit is contained in:
Oleksii Kriuchykhin 2017-10-10 13:32:14 +02:00
parent 03743a21f6
commit 58c2487eb6

View file

@ -4,12 +4,12 @@ if ENV['PAPERCLIP_HASH_SECRET'].nil?
exit 1
end
Paperclip::Attachment.default_options.merge!({
Paperclip::Attachment.default_options.merge!(
hash_data: ':class/:attachment/:id/:style',
hash_secret: ENV['PAPERCLIP_HASH_SECRET'],
preserve_files: false,
preserve_files: true,
url: '/system/:class/:attachment/:id_partition/:hash/:style/:filename'
})
)
if ENV['PAPERCLIP_STORAGE'] == "s3"