def METHOD_NAME(self, data: bytes, fname: str) -> None:
    self.drop_tmp_file(data, fname)
    if os.path.exists(self.safeoutfile):
        with open(self.safeoutfile, "rb"):
            shasum = hashlib.sha256(data).hexdigest()
            hash_path = os.path.join(self.download_path_uniq, shasum)
        # If we have content already, delete temp file
        if not os.path.exists(hash_path):
            os.rename(self.safeoutfile, hash_path)
            duplicate = False
        else:
            os.remove(self.safeoutfile)
            duplicate = True
        log.msg(
            format='SCP Uploaded file "%(filename)s" to %(outfile)s',
            eventid="cowrie.session.file_upload",
            filename=os.path.basename(fname),
            duplicate=duplicate,
            url=fname,
            outfile=shasum,
            shasum=shasum,
            destfile=fname,
        )
        # Update the honeyfs to point to downloaded file
        self.fs.update_realfile(self.fs.getfile(fname), hash_path)
        self.fs.chown(fname, self.protocol.user.uid, self.protocol.user.gid)