Netsach / concrete-datastore

A Highly Versatile REST Datastore built on top of Django
https://concrete-datastore.com
GNU General Public License v3.0
34 stars 17 forks source link

Delete old files when updating a file field #162

Open KhaledBousrih opened 1 year ago

KhaledBousrih commented 1 year ago

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.

paschembri commented 1 year ago

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