cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Send file whith post-metod

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 2 Feb 2009 20:40:18 -0800

On Tue, Feb 03, 2009 at 06:25:34AM +0300, Левченко Кирилл Сергеевич wrote:
> This version sends the file name you mention. The curl man page tells you to
> prefix the data with a '@' letter to read the data to send from the given
> file name. Like:
>
> curl -d @home/user/file1.xml [URL]
>
> Thanks.
> How change absolute directory on variable?
> curl -d @$file [URL]
> Don't work

That sounds like a shell quoting problem. Try curl -d @"$file" [URL]

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-02-03