Lines Matching refs:curlhandle
83 int upload(CURL *curlhandle, const char * remotepath, const char * localpath,
97 curl_easy_setopt(curlhandle, CURLOPT_UPLOAD, 1L);
99 curl_easy_setopt(curlhandle, CURLOPT_URL, remotepath);
102 curl_easy_setopt(curlhandle, CURLOPT_FTP_RESPONSE_TIMEOUT, timeout);
104 curl_easy_setopt(curlhandle, CURLOPT_HEADERFUNCTION, getcontentlengthfunc);
105 curl_easy_setopt(curlhandle, CURLOPT_HEADERDATA, &uploaded_len);
107 curl_easy_setopt(curlhandle, CURLOPT_WRITEFUNCTION, discardfunc);
109 curl_easy_setopt(curlhandle, CURLOPT_READFUNCTION, readfunc);
110 curl_easy_setopt(curlhandle, CURLOPT_READDATA, f);
112 curl_easy_setopt(curlhandle, CURLOPT_FTPPORT, "-"); /* disable passive mode */
113 curl_easy_setopt(curlhandle, CURLOPT_FTP_CREATE_MISSING_DIRS, 1L);
115 curl_easy_setopt(curlhandle, CURLOPT_VERBOSE, 1L);
130 curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 1L);
131 curl_easy_setopt(curlhandle, CURLOPT_HEADER, 1L);
133 r = curl_easy_perform(curlhandle);
137 curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 0L);
138 curl_easy_setopt(curlhandle, CURLOPT_HEADER, 0L);
142 curl_easy_setopt(curlhandle, CURLOPT_APPEND, 1L);
145 curl_easy_setopt(curlhandle, CURLOPT_APPEND, 0L);
148 r = curl_easy_perform(curlhandle);
163 CURL *curlhandle = NULL;
166 curlhandle = curl_easy_init();
168 upload(curlhandle, "ftp://user:pass@example.com/path/file", "C:\\file", 0, 3);
170 curl_easy_cleanup(curlhandle);