7
8
9
10
11
12
13
14
15
16
17
|
# File 'decidim-core/app/jobs/decidim/download_your_data_export_job.rb', line 7
def perform(user, export_format = ::Decidim::DownloadYourDataExporter::DEFAULT_EXPORT_FORMAT)
filename = "#{SecureRandom.urlsafe_base64}.zip"
path = Rails.root.join("tmp/#{filename}")
password = SecureRandom.urlsafe_base64
generate_zip_file(user, path, password, export_format)
save_or_upload_file(user, path)
File.delete(path)
ExportMailer.download_your_data_export(user, filename, password).deliver_later
end
|