Closed AliPolat closed 6 years ago
Hi, @AliPolat Can you provide more details?
What is you model structure? Do you use custom fields other than FileField
and ImageField
to store files?
Hi,
I think the the source of the problem:
This is the file get_all_media finds; C:/DjangoProjects/tektas/tektas/media\mail_admin_attachments\2018\06\05\Siparis_Raporu.pdf
And this is the file get_used_media finds; C:\DjangoProjects\tektas\tektas\media\mail_admin_attachments\2018\06\05\Siparis_Raporu.pdf
So because of the direction of slashes both strings treated as different, producing wrong file list to be deleted.
Now it is clear where to dig. Windows! )
Fixed in v.0.1.12
Hi,
The command cleanup_unused_media just figures out used files as deletable an deletes them.
Thank You.
My environment: Django 1.11.13 django-unused-media 0.1.11 Windows 7 python 3.4