Home | History | Annotate | Download | only in examples

Lines Matching full:curlhandle

68 static int upload(CURL *curlhandle, const char *remotepath,
82 curl_easy_setopt(curlhandle, CURLOPT_UPLOAD, 1L);
84 curl_easy_setopt(curlhandle, CURLOPT_URL, remotepath);
87 curl_easy_setopt(curlhandle, CURLOPT_FTP_RESPONSE_TIMEOUT, timeout);
89 curl_easy_setopt(curlhandle, CURLOPT_HEADERFUNCTION, getcontentlengthfunc);
90 curl_easy_setopt(curlhandle, CURLOPT_HEADERDATA, &uploaded_len);
92 curl_easy_setopt(curlhandle, CURLOPT_WRITEFUNCTION, discardfunc);
94 curl_easy_setopt(curlhandle, CURLOPT_READFUNCTION, readfunc);
95 curl_easy_setopt(curlhandle, CURLOPT_READDATA, f);
98 curl_easy_setopt(curlhandle, CURLOPT_FTPPORT, "-");
99 curl_easy_setopt(curlhandle, CURLOPT_FTP_CREATE_MISSING_DIRS, 1L);
101 curl_easy_setopt(curlhandle, CURLOPT_VERBOSE, 1L);
116 curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 1L);
117 curl_easy_setopt(curlhandle, CURLOPT_HEADER, 1L);
119 r = curl_easy_perform(curlhandle);
123 curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 0L);
124 curl_easy_setopt(curlhandle, CURLOPT_HEADER, 0L);
128 curl_easy_setopt(curlhandle, CURLOPT_APPEND, 1L);
131 curl_easy_setopt(curlhandle, CURLOPT_APPEND, 0L);
134 r = curl_easy_perform(curlhandle);
149 CURL *curlhandle = NULL;
152 curlhandle = curl_easy_init();
154 upload(curlhandle, "ftp://user:pass@example.com/path/file", "C:\\file",
157 curl_easy_cleanup(curlhandle);