#30422: Temporary files do not get deleted on canceled upload request. -------------------------------------+------------------------------------- Reporter: drutalj | Owner: Mattia | Procopio Type: Bug | Status: assigned Component: File | Version: master uploads/storage | Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by Mattia Procopio): I am analysing a bit the code to deal with uploads. I have noticed that `file_complete` method is never called if upload is interrupted. Now, since content lenght seems to be unreliable (in my tests is always 0) I am thinking how to solve this issue in a clean way. One of the option I am thinking about is to add a new flag to TemporaryFileUploadHandler that will be set to `True` within `file_complete` and having some cleanup code within `upload_complete` that will check if the flag is `True` or `False` and will delete the incomplete file. Does this sound right? -- Ticket URL: <https://code.djangoproject.com/ticket/30422#comment:3> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.7cde6262635c56d22c6077afd893749f%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.