mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-27 15:36:39 +08:00
Fix zip export [SCI-8734]
This commit is contained in:
parent
b520f8a04b
commit
d1302d322b
1 changed files with 2 additions and 2 deletions
|
@ -52,8 +52,8 @@ class ZipExport < ApplicationRecord
|
|||
tmp_full_zip_name = File.join(tmp_zip_dir, "export_#{Time.now.strftime('%F %H-%M-%S_UTC')}.zip")
|
||||
|
||||
fill_content(zip_input_dir, data, type, options)
|
||||
zip!(zip_input_dir, tmp_zip_file)
|
||||
zip_file.attach(io: File.open(tmp_full_zip_name), filename: tmp_zip_name)
|
||||
zip!(zip_input_dir, tmp_full_zip_name)
|
||||
zip_file.attach(io: File.open(tmp_full_zip_name), filename: tmp_full_zip_name)
|
||||
generate_notification(user) if save
|
||||
ensure
|
||||
FileUtils.rm_rf([zip_input_dir, tmp_full_zip_name], secure: true)
|
||||
|
|
Loading…
Add table
Reference in a new issue