CodeIgniter Forums
zip large files - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: zip large files (/showthread.php?tid=3858)



zip large files - El Forum - 10-25-2007

[eluser]tamara6[/eluser]
I'm looking for tips on how to create and deliver a fairly large zip file on the fly.

My users can select images and they will be added to a zip file, which gives them one convenient download. But I've discovered that if they ask for too many images then the application hangs and no file is delivered. I'm using code similar to this from the user guide:

$path = '/path/to/photo.jpg';

$this->zip->read_file($path);

// Download the file to your desktop. Name it "my_backup.zip"
$this->zip->download('my_backup.zip');

I have as many read_file steps as needed to add all the images to one zip file, but otherwise my code is identical.

Any tips on how to do this?

Thanks!

Tamara


zip large files - El Forum - 10-26-2007

[eluser]E1M2[/eluser]
Large and on the fly? If your app depends heavily on this feature
I would take a look into Amazon's S3 service. Intro for PHP Devs


zip large files - El Forum - 10-26-2007

[eluser]tamara6[/eluser]
Thanks for the answer. I'm not sure how it would help me, though. I have more than enough hard drive space for all my images. My main problem is, I guess, holding the zip file in RAM and then sending it all out. The computer has 2 GB of RAM, and the only thing running on it are apache and this code igniter app (and, of course, the OS). So you'd think sending out a 70 MB zip file should be a fairly easy job....