curl-library
Re: ftp upload on solaris ftp server (fwd)
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 17 Dec 2001 16:13:17 +0100 (MET)
Date: Mon, 17 Dec 2001 16:13:17 +0100 (MET)
Please don't take this off the list.
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/ ---------- Forwarded message ---------- Date: Mon, 17 Dec 2001 16:07:12 +0100 (CET) From: raoul cridlig <rcridlig_at_yahoo.fr> To: Daniel Stenberg <daniel_at_haxx.se> Subject: Re: ftp upload on solaris ftp server > Since you ask on the libcurl list, I assume you > wrote your own code that uses > libcurl to upload? Yep > If so, can you show us the > relevant pieces of the curl > interfacing code? > void ftpPut(CURL *curl, char *localfile, char *remotURL) { FILE *fd_src; char buf_1[BUF_LGTH] = "RNFR "; char buf_2[BUF_LGTH] = "RNTO "; char ur[URI_LGTH] = ""; struct curl_slist *headerlist = NULL; strcat(ur, remotURL); strcat(ur, "/"); strcat(ur, localfile); strcat(buf_1, "uncomplete"); strcat(buf_2, localfile); curl_global_init(CURL_GLOBAL_ALL); fd_src = fopen(localfile, "r"); headerlist = curl_slist_append(headerlist, buf_1); headerlist = curl_slist_append(headerlist, buf_2); curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ; curl_easy_setopt(curl,CURLOPT_URL, ur); curl_easy_setopt(curl, CURLOPT_POSTQUOTE, headerlist); curl_easy_setopt(curl, CURLOPT_INFILE, fd_src); curl_easy_perform(curl); curl_slist_free_all(headerlist); fclose(fd_src); } > libcurl does not prefix files with anything, that > comes from your program. I'm not sure, because it work with anyelse ftp server. > > Also please include curl version number, operating > system and a protocol > dump. > curl-7.9.2 DG/UX Help me Thanx ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Courrier : http://courrier.yahoo.frReceived on 2001-12-17