I had tried Archive::Zip earlier but gave up after this error.

Here what I have at the moment.:

...snip
my $zip = Archive::Zip->new();
my $member = $zip->addDirectory('myarchive/');
chdir("$dir") or die "Can't cd into $dir: $!\n";

my @jpegs = glob("*.jpg");
foreach my $f (@jpegs) {
          $member = $zip->addFile($f);
 }
die "write error" unless $zip->writeToFileNamed('Myzip.zip') == 
AZ_OK;
move("Myzip.zip","/var/www/htdocs/");
$r->internal_redirect("myzip.zip");

 return OK;
} # end of Handler
1;

And I am getting a Bad Request - Invalid URI in request GET 
/file_export HTTP/1.1 error. I am not sure about this error. Can't say 
I've seen it before.

Myzip.zip is created and is stored in DocumentRoot 
(/var/www/htdocs).

Will redo the literal path later. Any ideas? Should I be giving more 
content info?
Dp.







On 31 Aug 2005 at 12:40, Perrin Harkins wrote:

> On Wed, 2005-08-31 at 17:18 +0100, Dermot Paikkos wrote:
> > I need to create a archive file and send it back to the user.
> 
> Either do a system call to zip, or use Archive::Zip, write the file out
> in a directory under your web server, and send a redirect to the newly
> written file.
> 
> - Perrin
> 
> 
> 


~~
Dermot Paikkos * [EMAIL PROTECTED]
Network Administrator @ Science Photo Library
Phone: 0207 432 1100 * Fax: 0207 286 8668

Reply via email to