in reply to using uploadInfo from CGI.pm
try## pull the file in a variable my $fh = $query->upload('upload'); ## determine the file type via the headers my $type = $query->uploadInfo($fh)->{'Content-Type'};
I take an extra step, but found that having $info where I could get at it with the debugger paid off (once, which was enough).## pull the filename in a variable my $fname = $query->param('upload'); ## determine the file type via the headers my $info = $query->uploadInfo($fname); my $type = $info->{'Content-Type'};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: using uploadInfo from CGI.pm
by c (Hermit) on Nov 30, 2001 at 11:20 UTC | |
by dws (Chancellor) on Nov 30, 2001 at 11:25 UTC | |
by Anonymous Monk on Oct 18, 2002 at 14:54 UTC | |
by pernod (Chaplain) on Mar 05, 2003 at 16:37 UTC |