in reply to
lwp post file
here is the correct code for ajax img upload
my $browser = LWP::UserAgent->new;
$picture = 'fun.jpg';
$browser->default_header('X-Requested-With' => "XMLHttpRequest");
$browser->default_header('X-File-Name' => $picture);
my $value = read_file( $picture, binmode => ':raw', scalar_ref => 0);
my $response = $self->browser->post( "http://host.com/upload/profilepi
+c/?qqfile=".$picture,
Content_Type => 'application/octet-stream',
Content => $value
);
print $response->content;