cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Curl set up

From: Seldanne <seldanne_at_hotmail.com>
Date: Wed, 30 Apr 2008 14:42:23 -0500

So I'm trying the following...
 
curl -T "filename" -u user:password ftps://###.###.##.##:###/foldername -k
 
and got 'curl: <25> Failed FTP upload... I'm closer, but not quite there! :) If the file is located in a different folder, could I include the path in with the filename?

Date: Wed, 30 Apr 2008 19:13:20 +0000From: pylinuxian_at_gmail.comTo: curl-users_at_cool.haxx.seSubject: Re: Curl set up
this is what man page says. for a different port number i guess just try to add :port_numer to the url.
-T/--upload-file <file>
This transfers the specified local file to the remote URL. If there is no file part in the specified URL, Curl will append the local file name. NOTE that you must use a trailing / on the last directory to really prove to Curl that there is no file name or curl will think that your last directory name is the remote file name to use. That will most likely cause the upload operation to fail. If this is used on a http(s) server, the PUT command will be used.
Use the file name "-" (a single dash) to use stdin instead of a given file.
You can specify one -T for each URL on the command line. Each -T + URL pair specifies what to upload and to where. curl also supports "globbing" of the -T argument, meaning that you can upload multiple files to a single URL by using the same URL globbing style supported in the URL, like this:
curl -T "{file1,file2}" http://www.uploadtothissite.com
or even
curl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/
Received on 2008-04-30