我在Yii中使用Pluploader extension但我無法讓它在我的代碼上工作。我複製相同的代碼在現場解釋,但它讓我看到以下錯誤:PluploadWidget提供了一個錯誤
Property "PluploadWidget.config" is not defined.
我的代碼是:
<?php $this->widget('application.extensions.plupload.PluploadWidget', array(
'config' => array(
//'runtimes' => 'gears,flash,silverlight,browserplus,html5',
'url' => $this->createUrl('news/upload'),
//'max_file_size' => str_replace("M", "mb", ini_get('upload_max_filesize')),
'max_file_size' => Yii::app()->params['maxFileSize'],
'chunk_size' => '1mb',
'unique_names' => true,
'filters' => array(
array('title' => Yii::t('app', 'Images files'), 'extensions' => 'jpg,jpeg,gif,png'),
),
'language' => Yii::app()->language,
'max_file_number' => 1,
'autostart' => true,
'jquery_ui' => false,
'reset_after_upload' => true,
),
'callbacks' => array(
'FileUploaded' => 'function(up,file,response){console.log(response.response);}',
),
'id' => 'uploader'
)); ?>
有什麼錯我的代碼?
哈哈!我在http://yiiframework.ru/forum/viewtopic.php?f=3&t=10618找到了我的答案 –