cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: RFC1867 file upload from stdin

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 17 Aug 2001 07:38:44 +0200 (MET DST)

On Thu, 16 Aug 2001, Tony Arcieri wrote:

> Is there some way for curl to upload data passed from stdin using the RFC
> 1867 HTTP POST method? I have no problem uploading the data, but in order
> to do it it seems that I have to first write the output of the program
> which generates the data I want to upload to a temporary file first, then
> upload it. Is there any way around that?
>

Yes, you can upload a file from stdin using a command line similar to:

 curl -F file=@- http://thatsite.com

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-08-17