in reply to How do I upload a file to a https server?

Jonathan, I think what you want is something like this:
(make sure data.txt is in the local directory, or specify the full path)
use strict; use LWP::Useragent; use HTTP::Request::Common; my $ua = new LWP::UserAgent; my $res = $ua->request(POST 'https://<address>/cgi-bin/upload.pl', Content_Type => 'form-data', Content => [ foo => 'bar', bar => 'baz', FILE1 => ["data.txt"], ] );
update: Changed file field name.

Replies are listed 'Best First'.
Re^2: How do I upload a file to a https server?
by Anonymous Monk on Jun 08, 2004 at 10:21 UTC
    Thanks guys - it's working. I tried using the form field 'File1' yesterday but did not realise it was case sensitive. FILE1 works.

    Thanks.

    Jonathan.