cURL / Mailing Lists / curl-users / Single Mail

curl-users

Send file whith post-metod

From: Левченко Кирилл Сергеевич <levchenko.ks_at_nsk.vtb24.ru>
Date: Mon, 2 Feb 2009 13:36:30 +0300

 Please, help. How on PERL using Curl send file with post-request, using key
"-d".
 Keys "-F", "-T" server can't recognize.

Try this:

$file=</home/user/file1.xml>
    open (FS, "$file") or die "error open: $!";
    $upload=`curl -d <FS> $url/KbrReceive/"`;
    close FS;
sh: FS: No such file or directory

Or this:

        $upload=`curl -d "home/user/file1.xml" $url/KbrReceive/"`;
Don't work

On example, on JS this is realized like this:
httpRequest.open('POST', url, false ,prg_user,prg_password);
httpRequest.send(streamfile);
-------------------------------------------------------------------
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-02