CGI::uploadInfo returning undef?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi there,

Need a bit of help with CGI::uploadInfo method - I'm sure I used to be able
to get it to work.....

# snippet

use CGI qw/all/;

my $q=new CGI;

my $file=$q->param('my_resource'); # yes it is a multi-part form generated
using start_multipart_form()

    # getting here fine

    my $upload_info1=$q->uploadInfo($file);
    my $upload_info2=$q->uploadInfo($q->upload('my_resource')); # trying to
use the filehandle instead

    # both undef?

# end snippet

When I run this code both $upload_info1 AND $upload_info2 are undef?!? I can
successfully upload and save the file but I just can't seem to get the
header information.

Any ideas?




Re: CGI::uploadInfo returning undef?

Lord0 wrote:
Quoted text here. Click to load it

You may want to try the CPAN module CGI::UploadEasy to avoid the hazzle.

Gunnar Hjalmarsson

Site Timeline