The documentation in the yii site its about the installation and basic usage, the documentation your guys are asking for, its the jquery documentation.
The answers to all this questions are in the wiki, please take a look there.
Hi, anybody know how to implement multiple instances of the widget in a single page, I’ve created 2 juidialog and loaded a widget on each one from diferent views, but when a add I file to the second xupload widget it is queued to the first one, so how do I add files to each one separately, thank you
The jquery plugin has been updated to a new version, however the new documentation lacks many examples for common task, the old wiki has been restored and the examples are now back for the old version, please vote here to update or not the extension. take into account the lack of documentation for the new version.
Hi, I included this into a form I have but not sure how to incorporate basic functionality. I have been through all the docs and anything I could find on it. I just want to be able to upload files (and hopefully rename them) into a directory and store a path into my db. Is there some guidance somewhere on how to get me started with this?
Asgaroth, I appreciate the response. Yes I have been through those files, like I said anything I could find on the topic. I just need a booster to get running with it. Sorry should have included some of what I have done. Here is just where things stand now since I have tried a variety of things. I tried incorporating actionMultiple into my actionUpload in the controller but that didn’t work. Since I included your code into my form I assume they should be together?
//controller
public function actionUpload() {
$model = new Image;
if (isset($_POST['Image'])) {
$model->setAttributes($_POST['Image']);
if ($model->save()) {
if (Yii::app()->getRequest()->getIsAjaxRequest())
Yii::app()->end();
else
$this->redirect(array('view', 'id' => $model->ImageId));
}
}
$this->render('upload', array( 'model' => $model));
}
public function actions()
{
return array(
'upload'=>array(
'class'=>'ext.xupload.actions.XUploadAction',
'subfolderVar' => 'ImageId',
'path' => realpath(Yii::app()->getBasePath()."/../images/uploads"),
),
);
}
public function actionMultiple(){
$model = new XUploadForm;
$this->render('multiple', array(
'model' => $model,
));
}
The form appears and allows me to select files. When I click upload my form is submitted but files are not put into the called directory.
//view - within an existing form
<?php
$this->widget('ext.xupload.XUploadWidget', array(
'url' => Yii::app()->createUrl("image/upload", array("ImageId" => 1)),
'model' => $model,
'attribute' => 'file',
'multiple' => true,
));
?>
My only response to that is because I was trying to include this as part of another form. Taking your advice and trying to start from square one without introducing other attributes into the upload process. This is what I have now.
//controller
public function actions()
{
return array(
'upload'=>array(
'class'=>'ext.xupload.actions.XUploadAction',
'subfolderVar' => 'ImageId',
'path' => realpath(Yii::app()->getBasePath()."/../images/uploads"),
),
);
}
public function actionMultiple(){
$model = new ImageUpload;
$this->render('multiple', array(
'model' => $model,
));
}
public function actionError()
{
if($error=Yii::app()->errorHandler->error)
{
if(Yii::app()->request->isAjaxRequest)
echo $error['message'];
else
$this->render('error', $error);
}
}