nosbod has asked for the wisdom of the Perl Monks concerning the following question:
i'm trying to upload files with a form using WWW::Mechanize. The form looks like this:
the piece of code i'm using looks like this:<p><form enctype="multipart/form-data" action="upload.cgi" method="pos +t"> <p><b><u><font face="Arial,Helvetica"><font size=+1> To run a detailed ssSNPer analysis on a single SNP:</font></font></u></b> <p><font face="Arial,Helvetica">Specify the location of your file containing the test SNP rs# (e.g., "<a href="http://fraser.qimr.edu.au/general/da +leN/ssSNPer/rs1800630snp.txt">rs1800630snp.txt</a>"):</font> <br><input name="testSNP" type="file"> <p><font face="Arial,Helvetica">Specify the location of your HapMap SN +P genotype data dump file (e.g., "<a href="http://fraser.qimr.edu.au/gen +eral/daleN/ssSNPer/rs1800630dumpedregion.txt">rs1800630dumpedregion.t +xt</a>"):</font> <br><input name="HapMapData" type="file"> <p><font face="Arial,Helvetica">Please be patient, our web server may +be busy and depending upon the size of your test region your query may ta +ke a few minutes (the example files take ~90 seconds).</font> <br><input type="submit"> </form>
Anyone any ideas why this isn't working?$mech->get( "http://fraser.qimr.edu.au/general/daleN/ssSNPer/" ); $mech->form_number(1); $mech->field("testSNP"=>"/tmp/hapmap/rs11581638_name.txt"); $mech->field("HapMapData"=>"/tmp/hapmap/rs11581638_data.txt"); my $request=$mech->submit(); my $content=$request->content; print $content;
ta
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WWW::Mechanize and file upload
by ferreira (Chaplain) on Jan 05, 2007 at 18:16 UTC | |
by nosbod (Scribe) on Jan 05, 2007 at 21:45 UTC | |
|
Re: WWW::Mechanize and file upload
by Anonymous Monk on Jan 06, 2007 at 04:28 UTC | |
|
Re: WWW::Mechanize and file upload
by f00li5h (Chaplain) on Jan 07, 2007 at 04:23 UTC |