s3-bucket-stream-zip-php
s3-bucket-stream-zip-php copied to clipboard
Want to run multiple zip download from for loop but closes tab after 1st zip download starts
How to download multiple zips from for-loop call below code closes the browser tab when 1st zip download starts so that remaining loops cant work
i.e. $RowImagesData = array() // in which multiple references are added. $obj =& get_instance(); $obj->load->library('s3_stream'); $obj->load->library('aws_sdk'); $s3_dir= 'images/'; $bucketname= 'XYZ';
foreach ($RowImagesData as $RIKey => $RIValue) { $OrderId = $RIValue['reference'] $path = $s3_dir. $OrderId; $files = $obj->aws_sdk->listObjects(array('Bucket' => $bucketname, 'MaxKeys' => 1000, 'Prefix' => $path))->getPath('Contents'); if(count($files) > 0) { $obj->s3_stream->download($bucketname,$path,$orderid); } else { echo ""; } }