For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > November 2005 > downloading multiple blobs as one file









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author downloading multiple blobs as one file
lambelly

2005-11-11, 6:56 pm

I made a script for a friend which allowed the user to upload an image
file to a server which was then stored as a blob. However, I have not
come up with a good way to download the images other than downloading
them individually. Ideally, I would like to download them all as a zip
file or something like that. However, I don't know how to add blobs to
a zip file without using some sort of temp file to hold the blob. Is
there a good way to do this without having the physical files located
someplace on the server?

ZeldorBlat

2005-11-11, 6:56 pm

PHP's zip file functions are read-only as far as I know:
<http://www.php.net/zip>
So you can only use those to read zip files -- not make them.

I think the simplest way (if not the only way) is to save each of your
images to temporary place on the harddrive (i.e. /tmp/images) then run
the appropriate command using exec(). You can then present the
resulting zip file to the browser.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com