Creates many of zip files in temp directory

Created on 20 April 2025, 4 days ago

Problem/Motivation

Temporary directory fills up fairly quickly with zip files generated by this module.
When traffic is high it can fill up fast enough to fill the disk.
A new file is created for each download, as follows:

all_files.zip
all_files_0.zip
all_files_1.zip
all_files_2.zip
.......

Proposed resolution

I believe that one of the ways to solve this problem is to delete the temporary file each time the user finishes downloading it.

Data model changes

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΎUruguay apereira23

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @apereira23
  • πŸ‡ΊπŸ‡ΎUruguay ruby232 Montevideo

    One solution could be to generate the filename with a random name or using the timestamp.

  • πŸ‡ΊπŸ‡ΎUruguay ruby232 Montevideo

    @apereira23 I describe my interpretation of the problem and two possible solutions in a picture:

    I prefer the last solution, but there are two problems. It always duplicates the storage usage, and the zips are always public. However, it is more efficient to create the zip when the admin saves the entity. Creating the zip is hard on the CPU and can be easily exploited if the zip is created when the user requests the file. It is better to create it beforehand.

Production build 0.71.5 2024