Opened 14 months ago

Closed 14 months ago

Last modified 12 months ago

#22299 closed Cleanup/optimization (fixed)

Wizard storage should delete temp files when reset

Reported by: charettes Owned by: nobody
Component: contrib.formtools Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In order to keep reference to files uploaded through forms during a step submission files are temporally stored using the declared file_storage.

As documented, those temporary files are never deleted, even upon wizard reset or completion.

I understand that it's not possible to clean temporary files in all cases (i.e. incomplete wizard) but I think we should try to cleanup after ourselves when possible. That is when storage.reset is explicitly called.

Attaching a PR with a test and a documentation admonition.

Change History (5)

comment:2 Changed 14 months ago by erikr

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 14 months ago by erikr

  • Triage Stage changed from Accepted to Ready for checkin

Looks fine to me. With updated pull request, tests succeed on Python 2 and 3.

comment:4 Changed 14 months ago by Simon Charette <charette.s@…>

  • Resolution set to fixed
  • Status changed from new to closed

In fa8b4735287c92b03d23823de8a4e1168d1951d9:

Fixed #22299 -- Cleanup wizard temp files when possible.

Thanks to @erikr for the review.

comment:5 Changed 12 months ago by Florian Apolloner <florian@…>

In c95a3fadb7356e766fe48fae69ce81355180f46a:

[1.7.x] Fixed #22299 -- Cleanup wizard temp files when possible.

Thanks to @erikr for the review.

Backport of fa8b4735287c92b03d23823de8a4e1168d1951d9 from master.

Note: See TracTickets for help on using tickets.
Back to Top