mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-13 01:41:09 +08:00
Enable :preserve_files in paperclip config [SCI-1626]
This commit is contained in:
parent
03743a21f6
commit
58c2487eb6
1 changed files with 3 additions and 3 deletions
|
|
@ -4,12 +4,12 @@ if ENV['PAPERCLIP_HASH_SECRET'].nil?
|
||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
|
|
||||||
Paperclip::Attachment.default_options.merge!({
|
Paperclip::Attachment.default_options.merge!(
|
||||||
hash_data: ':class/:attachment/:id/:style',
|
hash_data: ':class/:attachment/:id/:style',
|
||||||
hash_secret: ENV['PAPERCLIP_HASH_SECRET'],
|
hash_secret: ENV['PAPERCLIP_HASH_SECRET'],
|
||||||
preserve_files: false,
|
preserve_files: true,
|
||||||
url: '/system/:class/:attachment/:id_partition/:hash/:style/:filename'
|
url: '/system/:class/:attachment/:id_partition/:hash/:style/:filename'
|
||||||
})
|
)
|
||||||
|
|
||||||
if ENV['PAPERCLIP_STORAGE'] == "s3"
|
if ENV['PAPERCLIP_STORAGE'] == "s3"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue