Skip to content

DownloadYourData export job : leftovers zip files in tmp directory #11415

@sdelcroix

Description

@sdelcroix

Describe the bug

During the export job, a temporary zip file is created in "tmp" folder before ActiveStorage attachment to user.

This ZIP file is not deleted at the end of the job

To Reproduce

  1. As user, ask for your data export
  2. Check the ZIP filename in the received mail
  3. See the remaining ZIP file in "tmp" folder

Expected behavior

The temporary ZIP file must be deleted after the export job ends

Screenshots

No response

Stacktrace

No response

Extra data

  • Device:
  • Device OS:
  • Browser:
  • Decidim Version: 0.26 to develop
  • Decidim installation:

Additional context

Simple fix in DownloadYourDataExportJob:

[...]
generate_zip_file(user, path, password, export_format)
save_or_upload_file(user, path)
# HERE THE FIX : delete temporary file
File.delete(path)
[...]

Can be backported until 0.26

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions