cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Curl won't read from stdin for --upload-file

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 20 Nov 2009 20:13:11 +0100 (CET)

On Wed, 18 Nov 2009, Paul M De Goes wrote:

> When I try to send data through stdin like this, however:
>
> echo "C:\\File\\File.txt" | curl --upload-file -
> http://www.mySite.com/index.php

That would only PUT the file name.

> curl --upload-file - http://www.stjohnhome.us/index.php < C:\\File\\File.txt

That's how it is done.

If you use -v or --trace-ascii as well, I'm sure you'll get some further clues
about what's going on!

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-20