Welcome Guest, Not a member yet? Register   Sign In
Zip library - Large file processing
#1

Hi,

I am trying to create a zip file of various images. This works fine when there are a few images (size wise) but when the size of the total images exceeds a certain amount I get "Memory Allocation" errors. I am aware I can increase the server memory limit, but I am looking for a solution that does not require this.

Perhaps there is a way to split the files into multiple zip files and download them?

Controller
Code:
$this->load->model('project_model');
$this->load->library('zip');

$cat_name = $this->project_model->get_name();
$zipname = $cat_name->name;
$zipname = $zipname . '.zip';        

$path = 'images/';
$images = $this->project_model->get_gallery();
        
foreach($images as $row){
    $files = $path.$row['img_name'];
    $this->zip->read_file($files);
}        
       
$this->zip->download($zipname);

Any ideas? Thank you  Smile
Reply


Messages In This Thread
Zip library - Large file processing - by drew - 02-11-2017, 10:08 AM
RE: Zip library - Large file processing - by drew - 02-12-2017, 12:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB