XUpload Update

The jquery plugin has been updated to a new version, the old wiki for the version this extension uses, has been mostly removed, many documentation and examples were lost, this is sad but not responsability of the extension, the old wiki with the old versione examples has been restored, so I’m opening a discussion, in wheter or not the extension should update to the current plugin version.

Take into account however, that the new jquery plugin does not have a complete wiki yet. mostly missing examples.

Of course.

I believe the new version fixes a lot of issues? :)

I haven’t tried the new version yet, nor could I found a list of either new features or bug fixes, so I don’t have a word here.

But I can tell that the lack of examples in the new version is a failure, many of the how-tos in the old version wiki are very common and used very often, forcing users to use the new version without this examples may lead into rejection of the extension for "lack of documentation".

What I propose ,is to keep the current version, until examples and extended documentation for the new version is added, time when it’d be more correct to upload the extension version.

But the decition is up to the community.

Looks like documentation and examples have been added for new version

But I couldn’t find the changelog or whatsoever to see what new version has to offer. Perhaps it has better browser compatibility… juts a guess.

Indeed there is a new plugin version, the version the extension currently uses its V4, I havent updated the extension yet, because i think the new version of the plugin lacks documentation, like the how tos avaliable for V4 thats why I havent updated yet. because people often come with this common issues, and without a wiki, i would have to provide examples or write the wiki myself, but im not the author of the plugin, and I dont use it often, so I dont really have the ability to write such a documentation. so I better stick to the V4 until the new version has better docs.

I am interested in trying to make a new version of this extension using the latest version Jquery upload.

This will be my first extension. I’m not really sure where to start… it’s a bit over my head at this stage. Lots to learn still.

Can anyone recommend some resources that I should read to be able to do this?

is there any way of file type filtering in this plugin?

Yes I think you should update it:) I enjoy this extention so much :)

Yes ofc read the plugin api.

I vote for an update as well. I would be willing to help some, but I haven’t created an extension before.

I don’t think the extension can do this with the version of file upload contained in the assets folder. I think you will have to update to a later version in the V4 branch where “acceptFileTypes” is available as an option, or write your own callback function which tests the file type. If I’m wrong could someone please post how they did it. Thanks in advance.

I beleave you should be using renderPartialinstead of render in your upload/index action (since you dont need the layout inside the CJuiDialog).

Also you need to call that with processOutput enabled, so that the javascript required for XUpload is correctly sent and executed:




public function actionIndex()

        {

                $model = new XUploadForm;

                renderPartial('multiple', array(

                        'model' => $model,

                ), false, true);

        }

Note: Untested

Hi,

I am using your xupload extension. Since i am doing an urgent project. i am seeking for immediate help.

I need to add keywords to each uploaded file.I am using queue method for this. i integrated text area with the ui.

i just want to know how and where i will get the value of these text boxes at the xuploadaction file;

please help. waiting for your response

faithfully

https://github.com/blueimp/jQuery-File-Upload/wiki/How-to-submit-additional-Form-Data-v4

The extension has been finally updated and moved to GitHub!

XUpload Extension for Yii

Please download and comment, any feedback is apreciated

Asgaroth, let me start by saying that this is a great extension!

Now i have a question, i dont know if i havent look very carefully but here is what i ended up doing. I tried to use:




<?php

Yii::import("xupload.models.XUploadForm");

class SiteController extends Controller {


	public function actions() {

		return array(

			'upload' => array(

				'class' => 'xupload.actions.XUploadAction',

				'path' => Yii::app() -> getBasePath() . "/../images/uploads", 

				"publicPath" => Yii::app()->getBaseUrl()."/images/uploads",

				'subfolderVar'=>false, 

			), 

		);

	}


	/**

	 * This is the default 'index' action that is invoked

	 * when an action is not explicitly requested by users.

	 */

	public function actionIndex() {

		// renders the view file 'protected/views/site/index.php'

		// using the default layout 'protected/views/layouts/main.php'

		$model = new XUploadForm;

		$this -> render('index', array('model' => $model, ));

	}


	/**

	 * This is the action to handle external exceptions.

	 */

	public function actionError() {

		if ($error = Yii::app() -> errorHandler -> error) {

			if (Yii::app() -> request -> isAjaxRequest)

				echo $error['message'];

			else

				$this -> render('error', $error);

		}

	}


}




but it didnt work for me (the subfolderVar) it kept uploading to the path with ("mdY") name, now what i did was comment out this part of xuploadaction.php:





if ($this -> subfolderVar !== null) {

            $this -> _subfolder = Yii::app() -> request -> getQuery($this -> subfolderVar, date("mdY"));

        } else if ($this -> subfolderVar !== false) {

            $this -> _subfolder = date("mdY");

        }



I dont like it but it worked, any idea why is not working?

By the way, this is out of the box, the demo you have. Not in my project.

manuelpm, Try this





if ($this -> subfolderVar !== null && $this -> subfolderVar !== false) {

            $this -> _subfolder = Yii::app() -> request -> getQuery($this -> subfolderVar, date("mdY"));

        } else if ($this -> subfolderVar === null) {

            $this -> _subfolder = date("mdY");

        }

Asgaroth, Thanks for your reply! It is working now, I just have to make the onComplete call work and everything will be just fine.

Thx again for a great extension.

Followed your instructions - works like a treat! Thanks

hi, i’m using your xupload extension. this extension is works great, my question is how to disable the jquery ui css? the jui css always loaded. thanks




$( ".form-upload .fileinput-button" ).addClass("disabled").find("input[type=file]").attr("disabled", "disabled");