I am using django(1.4) formwizard for my application. In step 1 I am uploading 2 files. These files are used in second step. Everything is working fine but this ---> "When I complete all steps OR I stop after step 1 I still have temporary files stored in MEDIA directory"
How can I ensure that these files are deleted in any of the cases?
Django says on the documentation that you have to manage these files yourself, so:
You can set the uploading path to /tmp (if you are using Linux), so that they are automatically deleted.
Another approach is that you can write a script to run periodically and delete them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With