hi friends
how to get image uploaded path in xupload etention ?
HomeController.php
views/home/editUser.php
I then uploaded the photo URL into the text box !
how to get image uploaded path in xupload etention ?
HomeController.php
class HomeController extends Controller { public function actions() { return array( 'upload'=>array( 'class'=>'xupload.actions.XUploadAction', 'path' =>Yii::app() -> getBasePath() . "/../uploads", 'publicPath' => Yii::app() -> getBaseUrl() . "/uploads", ), ); } function actionEditUser($id) { $model = User::fetchUserData($id); $upload = new XUploadForm; //.... any code $this->render('back/editUser',array('model'=>$model, 'perm'=>$permission, 'listAccess'=>$listAccess, 'upload' => $upload)); } }
views/home/editUser.php
<?php $this->widget('xupload.XUpload', array( 'url' => Yii::app()->createUrl("cpanel/home/upload", array("parent_id" => 1)), 'model' => $upload, 'attribute' => 'file', 'multiple' => true, )); ?>
I then uploaded the photo URL into the text box !