def delete_file(self, instance, sender, **kwargs):
file_ = getattr(instance, self.attname)<EOL>query = Q(**{self.name: file_.name}) & ~Q(pk=instance.pk)<EOL>qs = sender._default_manager.filter(query)<EOL>if (file_ and file_.name != self.default and not qs):<EOL><INDENT>default.backend.delete(file_)<EOL><DEDENT>elif file_:<EOL><INDENT>file_.close()<EOL><DEDENT>
Adds deletion of thumbnails and key value store references to the
parent class implementation. Only called in Django < 1.2.5