gpt4 book ai didi

Yii CMultiFileUpload 一次选择多个文件不起作用

转载 作者:行者123 更新时间:2023-12-02 03:47:00 25 4
gpt4 key购买 nike

我想一次选择多个文件,但只有一个文件始终显示在 MultiFile-list Div 容器中,并且可以删除它。但我想购买我选择的所有文件。我做错了什么?

$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)
)

);

最佳答案

CMultiFileUpload 基于 jQuery Multiple File Upload Plugin ($.MultiFile) .在它的网站上,我们可以阅读:

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)

所以内置小部件可能不是您要找的东西。 Xupload yii extension ,另一方面可能是您正在寻找的东西。

关于Yii CMultiFileUpload 一次选择多个文件不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16295494/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com