def METHOD_NAME(self, name, content):
    path = self._make_filetracker_path(name)
    if hasattr(content, 'temporary_file_path'):
        filename = content.temporary_file_path()
    elif (
        getattr(content, 'file', None)
        and hasattr(content.file, 'name')
        and os.path.isfile(content.file.name)
    ):
        filename = content.file.name
    elif isinstance(content, FileInFiletracker):
        # This happens when file_field.save(path, file) is called
        # explicitly
        return content.name
    else:
        f = tempfile.NamedTemporaryFile()
        for chunk in content.chunks():
            if isinstance(chunk, str):
                chunk = chunk.encode('utf-8')
            f.write(chunk)
        f.flush()
        filename = f.name
    # If there will be only local store, filetracker will ignore
    # 'to_local_store' argument.
    name = self._cut_prefix(
        self.client.put_file(path, filename, to_local_store=False)
    )
    name = FiletrackerFilename(name)
    content.close()
    return name