|
From: Potozniak, A. <acs...@ub...> - 2005-07-21 19:08:06
|
Fellow CGI::Prototypers:
=20
I have run into a strange problem when using C::P::Mecha.
=20
My prototype page has a form on it which has an input type of 'file' and
the form has an enctype of multipart/form-data.
Now when I upload a file via the web everything works perfectly fine,
but when I try to simulate this with C::P::Mecha it seems that I have to
hit '^C' to get the submission of the file to complete, otherwise the
test script hangs. Now there are other form submissions that I am doing
in my test script that work perfectly with out this intervention.
=20
A couple of thoughts that I have: =20
=20
Maybe (for some odd reason) ^C causes the upload stream to terminate
thus finishing off the form submission.
There might be some other unknown issue with file uploading with
mech that I'm unaware of.
=20
Here is some sample code:
=20
$m->field('file_name', '/some/file');
$m->click('upload'); #This is where it hangs
=20
Thank you for your help,
~~Andrew
=20
010100000110111101110100011011110111101001101110011010010110000101101011
Andrew Potozniak
Administrative Computing
Programming Intern
State University of New York at Buffalo
010100000110111101110100011011110111101001101110011010010110000101101011
=20
"All that is visible must grow beyond itself; extend into the realm of
the invisible." (TRON 1982)
=20
|