Hello,
I have a problem to upload a file in a form.
This is my script:

#!/usr/bin/perl
use LWP::UserAgent;
$ua = new LWP::UserAgent;
    my $url = "http://192.168.0.1/upload.php<http://192.168.0.1/upload_log.php>
";
    my $hostname=`hostname`;
    chomp($hostname);
    my $file="$hostname\.log";

    my $res = $ua->post( $url,
           Content_Type => 'form-data',
           Content => [
               file1     => [$file, $file],
           ],
    );
    my $stuff  =  $res->content;
    print $stuff;

When I upload with Internet explorer or Mozilla no problem.
But with my script , the upload does not work , I have this in my apache
logs:

192.168.0.1 "POST upload.php" HTTP/1.1" 200* 304*
Someone have an idea, it seems a cache problem?

Thx
 Oxx

Reply via email to