s3-bucket-stream-zip-php icon indicating copy to clipboard operation
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

Open DeepGandhi1602 opened this issue 6 years ago • 0 comments

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 ""; } }

DeepGandhi1602 avatar Apr 12 '18 07:04 DeepGandhi1602