public function delete_upload($force = true)
    {
        // Bail early if not uploaded.
        if ($this->get_upload_path() === null) {
            return false;
        }

        if ($this->get_id() !== null) {
            $result = !\wp_delete_attachment($this->get_id(), $force) === false;
        } else {
            \wp_delete_file($this->get_upload_path());
            $result = !\file_exists($this->get_upload_path());
        }

        if ($result === true) {
            $this->attachment_id = null;
            $this->upload_path = null;
            $this->upload_error = null;
            $this->upload_type = null;
            $this->upload_url = null;
        }

        return $result;
    }