im trying to rebuild a request (File upload), the packed send from the webbrowser looks like this:
-----------------------------596088922920
Content-Disposition: form-data; name="Filedata"; filename="mypic.gif"
Content-Type: image/gif
GIF87aX# *shorted* ¡§\
-----------------------------596088922920
Content-Disposition: form-data; name="session"
92384729384792384729384729384
-----------------------------596088922920
Content-Disposition: form-data; name="method"
put
-----------------------------596088922920--
my per code looks like this:
use WWW::Mechanize;
$agent = WWW::Mechanize->new( cookie_jar => {} );
$agent->post('http://www.kleiderkreisel.de/photo/ajax_photo_action',
[
"Filedata" => ['mypic.gif' => 'C:\Pics\mypic.gif'],
'session' => '92384729384792384729384729384',
'method' => 'put'
]);
sadly this gives me the error "Internal Server Error"... What am i doing wrong?