cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl-sftp: upload multiple files

From: aiooua <aiooua_at_gmail.com>
Date: Tue, 26 Apr 2011 08:57:13 -0400

On Tue, Apr 26, 2011 at 3:02 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Mon, 25 Apr 2011, aiooua wrote:
>> I'm uploading a big bunch of files to an sftp server using libcurl. Can someone point me to a sample or
>> general guideline on how multiple FTP uploads can be performed for a single sftp login?
> Exactly like libcurl works with any other protocol it supports: re-use the easy handle and just set the
> new options for the next transfer and do another curl_easy_perform().

Great! So, all I need to do is invoke curl_easy_perform() multiple
times and ensure that my CURLOPT_READFUNCTION keeps track of which
file's data needs to be returned.

> (Can I just also add that sftp is nothing like FTP so your mentioning of FTP up there is a bit odd-looking to me!)

I'm sorry about the ambiguity in my wording. I'm using -only- SFTP.
Actually, I didn't know that they are completely different protocols,
I assumed they were similar like HTTP and HTTPS are. I now know that
they're different and thanks to you for that!

Thanks again for your responses.

--
ajd.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-04-26