mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 09:42:46 +08:00
Change download path for report templates
This commit is contained in:
parent
a5389b780c
commit
8d6c0b4380
1 changed files with 2 additions and 2 deletions
|
@ -12,8 +12,8 @@ contents = case template_zip_url.scheme
|
||||||
when 'https'
|
when 'https'
|
||||||
HTTParty.get(template_zip_url).body
|
HTTParty.get(template_zip_url).body
|
||||||
when 's3'
|
when 's3'
|
||||||
system("AWS_PAGER=\"\" aws s3api get-object --bucket #{template_zip_url.host} --key #{template_zip_url.path[1..]} ./report_templates.zip")
|
system("AWS_PAGER=\"\" aws s3api get-object --bucket #{template_zip_url.host} --key #{template_zip_url.path[1..]} #{ENV.fetch('APP_HOME', '.')}/app/views/reports/report_templates.zip")
|
||||||
File.read('./report_templates.zip')
|
File.read("#{ENV.fetch('APP_HOME', '.')}/app/views/reports/report_templates.zip")
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "Loaded report templates zip from #{template_zip_url_string}"
|
puts "Loaded report templates zip from #{template_zip_url_string}"
|
||||||
|
|
Loading…
Reference in a new issue