public function to_base64()
    {
        if (!empty($this->get_upload_path())) {
            return \base64_encode(\file_get_contents($this->get_upload_path()));
        }

        return \base64_encode(\file_get_contents($this->get_tmp_path()));
    }