mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 11:14:24 +08:00
Also remove temp file after other types of ZIP export generation [SCI-2646]
This commit is contained in:
parent
5defbdd76e
commit
ee611a45d9
1 changed files with 4 additions and 1 deletions
|
@ -58,7 +58,10 @@ class ZipExport < ApplicationRecord
|
|||
fill_content(dir_to_zip, data, type, options)
|
||||
zip!(dir_to_zip, output_file.path)
|
||||
self.zip_file = File.open(output_file)
|
||||
generate_notification(user) if save
|
||||
if save
|
||||
FileUtils.rm_rf([dir_to_zip, output_file], secure: true)
|
||||
generate_notification(user)
|
||||
end
|
||||
end
|
||||
|
||||
handle_asynchronously :generate_exportable_zip
|
||||
|
|
Loading…
Reference in a new issue