code: def _clean_file_name(self, model_instance, filename):
          
          available_name = self.storage.get_available_name(
              self.generate_filename(model_instance, filename))
          return os.path.basename(available_name)
docs: We need to make sure we know the full file name before we save the thumbnail so
          we can be sure the name doesn't change on save.
  
          This method gets the available filename and returns just the file part.