cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ftp uploads and creating remote directories

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 18 Feb 2003 01:00:50 +0100 (CET)

On Mon, 17 Feb 2003, Thomas, Mathew wrote:

> Does anyone have a quick example of how to upload files via libcurl and ftp
> in which the remote directories must be created? I suspect I must use
> CURLOPT_QUOTE in some fashion.

Start out with the docs/examples/ftpupload.c example.

But instead of the CURLOPT_POSTQUOTE used in there for renaming after an
upload, use CURLOPT_QUOTE to do "MKD dir" (assuming the upload path is
something like "ftp://host/dir/filename").

Oh, and when you have it working, please submit it here so that we can
include it as an example source for future users!

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-02-18