hotsolutions has asked for the wisdom of the Perl Monks concerning the following question:
so - is there any way to pass the file as an in-memory object? I can do it with something like this:$mech->submit_form(form_name => 'something', fields => { file1 => '/tm +p/myfile' }
but how would I determine the content type for any type of file?my $input = $m->current_form()->find_input('file1'); $input->content( $content_here ); $input->filename( $filename ); $input->headers( content_type => $content_type );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Upload in-memory files with WWW:Mechanize
by BrowserUk (Patriarch) on Mar 05, 2009 at 04:43 UTC | |
|
Re: Upload in-memory files with WWW:Mechanize
by kyle (Abbot) on Mar 05, 2009 at 04:15 UTC | |
|
Re: Upload in-memory files with WWW:Mechanize
by Anonymous Monk on Mar 05, 2009 at 04:39 UTC | |
|
Re: Upload in-memory files with WWW:Mechanize
by ikegami (Patriarch) on Mar 05, 2009 at 04:29 UTC |