in reply to Reading CGI.pm file upload spools with Archive::Zip
$zip = Archive::Zip->new(...);
is the same as
$zip = Archive::Zip->new();
my $status = $zip->read(...);
$zip = undef unless ($status == AZ_OK);
so use
$zip = Archive::Zip->new();
my $status = $zip->readFromFileHandle($upload_filehandle);
$zip = undef unless ($status == AZ_OK);
Untested.
Update: You know what, it looks like read() and (therefore) new() accept a filehandle as an alternative to a file name. So, $zip = Archive::Zip->new($upload_filehandle); should work fine.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading CGI.pm file upload spools with Archive::Zip
by OverlordQ (Hermit) on Sep 01, 2004 at 20:31 UTC | |
by siroskey (Initiate) on Sep 16, 2004 at 01:47 UTC |