RatArsed has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to get CGI->upload() to work with our IIS5 server (and no, we can't just use Apache as we require NTLM authentication), yet it doesn't appear to want to work
The source is pretty much identical to example 5.2 from O'Reilly's CGI programming with Perl, but I've included my bastardised version below:
It appears that $filehandle is undefined...# No Errors detected # Deal with the uploaded file my $filename = $request->param('file'); my $filehandle = $request->upload( $filename ); while( $filename =~ s/(.+)\\(.+)/$2/gi ) {} unless( $request->cgi_error ) { # No errors so far if( open( FILE, "c:\\temp\\$filename" ) ) { binmode( FILE ); binmode( $filehandle ); while( read( $filehandle, $buffer, BUFFER_SIZE ) ) { print FIL +E $buffer; } $shorttitle = "Success : Upload :"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI upload and IIS 5
by BigJoe (Curate) on Jun 05, 2001 at 17:58 UTC | |
by RatArsed (Monk) on Jun 05, 2001 at 18:02 UTC | |
|
(jeffa) Re: CGI upload and IIS 5
by jeffa (Bishop) on Jun 05, 2001 at 18:25 UTC | |
by RatArsed (Monk) on Jun 05, 2001 at 18:31 UTC | |
|
Re: CGI upload and IIS 5
by thpfft (Chaplain) on Jun 05, 2001 at 18:23 UTC | |
by RatArsed (Monk) on Jun 05, 2001 at 18:28 UTC | |
|
Re: CGI upload and IIS 5
by mexnix (Pilgrim) on Jun 05, 2001 at 18:43 UTC | |
by RatArsed (Monk) on Jun 05, 2001 at 18:55 UTC |