Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django Cropping - Duplicates in DB and File Storage #122

Open
python-force opened this issue Oct 17, 2017 · 3 comments
Open

Django Cropping - Duplicates in DB and File Storage #122

python-force opened this issue Oct 17, 2017 · 3 comments

Comments

@python-force
Copy link

Why is Django Cropping when you change in Admin the resizing rectangle creating new files and also in DB. Basically, if you keep changing that rectangle your DB is getting bigger and file storage is filling up with files which are not used anymore.

Here is an example
Old Value of Cropping: 50, 0, 1205, 833
New Value of Cropping: 0, 0, 1155, 833

Now in my file storage have files that are not used anymore. Images with "50, 0, 1205, 833" will be sitting there forever and also in DB look at the screenshots.

It should be done:

If images exist delete them and create new with "0, 0, 1155, 833" cropping and also in DB the values should be changed for the same image source "50, 0, 1205, 833" to "0, 0, 1155, 833".

If cropping value can change in the Admin for the image and there is no other filed for old value then table easy_thumbnails_thumbnail can do that also rewriting the data not make duplicates.

django-cropping
django-cropping2
django-cropping3

@ykh
Copy link

ykh commented Jan 5, 2019

It's a clear issue! Any solution or workaround?

@Kryzhanivskyi
Copy link

Is it has been done?

@MRigal
Copy link
Contributor

MRigal commented May 7, 2020

No it hasn't been done until now. Feel free to send a PR. Consider handling also #119 which is a similar case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants