Extract cloud upload response helper
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user