#31201: Atomic Transaction Roll Back File Upload
-----------------------------------+--------------------------------------
Reporter: Yash Jhunjhunwala | Owner: nobody
Type: Bug | Status: closed
Component: Uncategorized | Version: 2.2
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Carlton Gibson):
* status: new => closed
* resolution: => wontfix
Comment:
This is long-standing behavior, I'm afraid.
[https://docs.djangoproject.com/en/3.0/ref/models/fields/#django.db.models.fields.files.FieldFile.delete
FileField docs]:
> Note that when a model is deleted, related files are not deleted. If you
need to cleanup orphaned files, you’ll need to handle it yourself (for
instance, with a custom management command that can be run manually or
scheduled to run periodically via e.g. cron).
c.f. Malcolm Tredinnick on
https://code.djangoproject.com/ticket/11663#comment:14
Just quickly trying to think about how one might tie the transaction
rollback into the file upload handling, a periodic cleanup command is
instantly more appealing. I hope that makes sense.
--
Ticket URL: <https://code.djangoproject.com/ticket/31201#comment:1>
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/061.f33d634ad56144027ba601735d5b7926%40djangoproject.com.