concrete-datastore icon indicating copy to clipboard operation
concrete-datastore copied to clipboard

Delete old files when updating a file field

Open KhaledBousrih opened this issue 2 years ago • 1 comments

Currently, (v 1.52.0) When an instance of a model containing a file field is deleted, the latest file is also deleted from the storage.

However, when an instance is updated with a new file, the old file still exist on the storage.

We need to delete the old file locally, when updating an instance with a new one.

KhaledBousrih avatar Jun 01 '23 14:06 KhaledBousrih

See this library : https://github.com/un1t/django-cleanup

paschembri avatar Jun 09 '23 07:06 paschembri