Extract cloud upload response helper

This commit is contained in:
2026-06-15 20:16:29 +02:00
parent d2418b824d
commit 58ff301580
4 changed files with 56 additions and 2 deletions

View File

@@ -57,6 +57,12 @@ struct curl_httppost* create_cloud_upload_form(const std::string& filename)
return formpost;
}
void handle_cloud_upload_transfer_result(CURLcode err, const std::string& res)
{
(void)err;
std::cout << "\n\nUPLOAD RESULT\n" << res << "\n\n\n";
}
void execute_cloud_download_transfer(
App& app,
std::string url,
@@ -139,7 +145,7 @@ void execute_cloud_upload_transfer(
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
}
auto err = curl_easy_perform(curl);
std::cout << "\n\nUPLOAD RESULT\n" << res << "\n\n\n";
handle_cloud_upload_transfer_result(err, res);
curl_easy_cleanup(curl);
}
}