def delete_file_from_filesystem(doc, only_thumbnail=False):
 if only_thumbnail:
  delete_file(doc.thumbnail_url)
 else:
  delete_file(doc.file_url)
  delete_file(doc.thumbnail_url)

def delete_file_from_filesystem ( doc , only_thumbnail = False ) : if only_thumbnail : delete_file ( doc . thumbnail_url ) else : delete_file ( doc . file_url ) delete_file ( doc . thumbnail_url )
delete file .