mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-10 06:06:24 +08:00
Merge pull request #1433 from okriuchykhin/ok_SCI_2864
Additional fix for export all S3 path [SCI-2864]
This commit is contained in:
commit
1c8407e4f4
1 changed files with 7 additions and 2 deletions
|
|
@ -9,8 +9,13 @@ class TeamZipExport < ZipExport
|
|||
|
||||
# Override path only for S3
|
||||
if ENV['PAPERCLIP_STORAGE'] == 's3'
|
||||
s3_path = '/zip_exports/:attachment/:id_partition/:hash/:style/:filename'
|
||||
s3_path.prepend("/#{ENV['S3_SUBFOLDER']}") if ENV['S3_SUBFOLDER']
|
||||
s3_path =
|
||||
if ENV['S3_SUBFOLDER']
|
||||
"/#{ENV['S3_SUBFOLDER']}/zip_exports/:attachment/"\
|
||||
":id_partition/:hash/:style/:filename"
|
||||
else
|
||||
'/zip_exports/:attachment/:id_partition/:hash/:style/:filename'
|
||||
end
|
||||
|
||||
has_attached_file :zip_file, path: s3_path
|
||||
validates_attachment :zip_file,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue