def METHOD_NAME(
    self,
    file: bytes,
    destination_path: PurePath,
):
    """
    Copy a file to the remote host using SFTP
    :param file: File to copy
    :param destination_path: File destination path on the remote host
    :raises Exception: If the file copy failed
    """
    self._percent_transferred_log_target = 0.1
    try:
        with self._client.open_sftp() as sftp:  # type: ignore [union-attr]
            sftp.putfo(
                io.BytesIO(file),
                str(destination_path),
                file_size=len(file),
                callback=self._log_transfer,
            )
            sftp.chmod(str(destination_path), 0o700)
    except Exception as err:
        error_message = f"Error uploading file: ({err})"
        logger.error(error_message)
        raise err