add share button and implement AirDrop share in OSX, update info.plist to set on Mac OS the default app for PPI, on iOS include the Documents/Inbox subfolder used to store the received files from AirDrop
This commit is contained in:
@@ -208,15 +208,13 @@ int progress_callback_upload(void *clientp, curl_off_t dltotal,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void App::download(std::string filename, std::function<void(float)> progress)
|
||||
void App::download(std::string url, std::string dest_filepath, std::function<void(float)> progress)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if (curl)
|
||||
{
|
||||
auto dest = data_path + "/" + filename;
|
||||
FILE* fp = fopen(dest.c_str(), "wb");
|
||||
std::string url = "https://panopainter.com/cloud/cloud-dwl.php?file=" + filename;
|
||||
LOG("download %s to %s", url.c_str(), dest.c_str());
|
||||
FILE* fp = fopen(dest_filepath.c_str(), "wb");
|
||||
LOG("download %s to %s", url.c_str(), dest_filepath.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_data_write);
|
||||
|
||||
Reference in New Issue
Block a user