Yii CMultiFileUpload select multiple files at once doesnt work

1.3k Views Asked by At

i want to select multiple files at once, but only ONE File always shows up in the MultiFile-list Div container with the possibility to delete it. But i want to shop up all the files i selected. What am i doing wrong?

$this->widget('CMultiFileUpload', array(
'model' => $gallery,
'name' => 'attachments',
'accept' => 'jpg|png',
'denied' => 'Only doc,docx,pdf and txt are allowed',
'max' => 100,
'duplicate' => 'Already Selected',
'options'=>array(

 ),
'htmlOptions' => array('multiple' => 'multiple', 'size' => 25)
    )

);

1

There are 1 best solutions below

0
On

CMultiFileUpload is based on jQuery Multiple File Upload Plugin ($.MultiFile) . On it's site we can read:

What this isn't

This plugin will not create a dialog that allows the user to select multiple files at once. That simply cannot be done via javascript. If that's what you need, you should consider using HTML5's multiple="multiple" attribute or one of the many other flash based file upload solutions (eg.: SWFupload, uploadify and others)

So probably the built in widget isn't what you are looking for. Xupload yii extension, on the other hand might be what you are looking for.