Viewing duplicates in XUpload Yii

I need two upload files with two upload modes in one page with XUpload extension in Yii, but output the upload view first.

$model = new MMediaUploadForm;
    $url = aUrl('/project/media/upload', array('projectId' => $this->project->id));
    $this->widget('uniprogy.extensions.xupload.XUpload', array(

        'url' => $url,
        'model' => $model,
        'attribute' => 'file',
        'downloadView' => $this->render('download', array('listWorkletId' => $this->getDOMId()), true),
        'uploadView' => $this->render('upload', array(), true),
        'uploadTemplate' => '#template-upload',
        'formView' => $this->render('form', array(
            'url' => $url,
            'model' => $model,
            'attribute' => 'file',
            'htmlOptions' => array(
                'id' => get_class($model) . "-form",
                'enctype' => 'multipart/form-data',
            ),
        ), true),

    ));

$url1 = aUrl('/project/media/upload1', array('projectId' => $this->project->id));
    $this->widget('uniprogy.extensions.xupload.XUpload', array(

        'url' => $url1,
        'model' => $model,
        'attribute' => 'file',
        'downloadView' => $this->render('download', array('listWorkletId' => $this->getDOMId()), true),
        'uploadView' => $this->render('upload1', array(), true),
        'uploadTemplate' => '#template-upload1',
        'formView' => $this->render('form1', array(
            'url' => $url1,
            'model' => $model,
            'attribute' => 'file',
            'htmlOptions' => array(
                'id' => get_class($model) . "-form",
                'enctype' => 'multipart/form-data',
            ),
        ), true),

    ));

      

I have two text / x-tmpl with two IDs, but just output the first snapshot! help me plz thanks!

+3


source to share





All Articles