2009/10/12 Xu, Qiang (FXSGSC) <[email protected]>: >> -----Original Message----- >> From: [email protected] >> [mailto:[email protected]] On Behalf Of Michael Wood >> Sent: Friday, October 09, 2009 4:58 PM >> To: libcurl development >> Subject: Re: libcurl and libssh2 >> >> The curl command can generate sample code for any options you specify. >> >> Try this: >> curl -u username sftp://shell.example.com/etc/issue --libcurl >> ftp-download-example.c curl -T uploadfile -u user:passwd >> ftp://ftp.upload.com/myfile --libcurl ftp-upload-example.c >> >> and then examine the ssh2-{download,upload}-example.c files >> that are generated. > > I tried your method today, unsuccessfully: > ====================================== > q...@durian(pts/0):~[123]$ curl -v -u qxu:fair123 -T 01.pdf > ftp://13.198.98.202//home/qxu/scan/001.pdf --libcurl ftp_upload_test.c > curl: option --libcurl: is unknown > curl: try 'curl --help' for more information > ====================================== > Anything wrong in my usage, Michael?
Your usage looks correct to me. Is this a normal version of curl or has it been modified to remove functionality that is not necessary on your embedded platform? Is it a recent version of curl? I don't know when the --libcurl option was implemented. I tried this with version 7.18.0 on Linux: $ curl -v -u user:pass -T 01.pdf ftp://localhost/ --libcurl ftp_upload_test.c and I have attached the file that was generated. -- Michael Wood <[email protected]>
ftp_upload_test.c
Description: Binary data
------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
