def cleanup_uploaded_log_file(sender, instance, **kwargs): from hsreplaynet.utils import delete_file_async file = instance.file if file.name: delete_file_async(file.name) descriptor = instance.descriptor if descriptor.name: delete_file_async(descriptor.name)
def cleanup_hsreplay_file(sender, instance, **kwargs): from hsreplaynet.utils import delete_file_async file = instance.replay_xml if file.name: delete_file_async(file.name)