Reputation: 25
I used mulitple upload file widget of yii.
$this->widget('CMultiFileUpload',
array(
'model'=>$model,
'attribute' => 'Image',
'accept'=>'jpg|gif|png|doc|docx|pdf',
'denied'=>'Only jpg,doc,docx,pdf and txt are allowed',
'max'=>4,
'remove'=>'[x]',
'duplicate'=>'Already Selected',
)
);
If i upload more than one document then it will look like this in table as well as listing and view page.
14461933290_14459232190_Tax-21300173.pdf,14461933291_Tax-21300173.pdf
Name stored into table and pdf stored into folder of project. I provide download link into view page for download document.
array('label'=>'image',
'type'=>'html',
'value'=>CHtml::link(CHtml::encode($model->image), "http://localhost/avproject/test1/index.php/pin/downloadImage/".$model->id, array("target"=>"_blank"))
),
how to download this multiple uploaded pdf doument. when i upload single document then it will work properly but more than one document then it will not download proper image.
Upvotes: 0
Views: 101
Reputation: 820
As far as i know you can't download multiple files using same request. Here's good answer to your question Download Multiple files in one HTTP request.
Upvotes: 1