Efineuploader Help

Hi there,

I’m trying to get the EFineUploader Extension to work and need some help.

The model I want to use it in is called ‘Property’

And I’ve created a folder to put uploaded files into at localhost/myApp/images/uploads

This is the code I have in _form.php:







                          'endpoint'=>'/property/upload',// OR $this->createUrl('property/upload'),






                                        'onComplete'=>"js:function(id, name, response){  }",

                                        'onError'=>"js:function(id, name, errorReason){ }",




                                 'sizeLimit'=>2 * 1024 * 1024,//maximum file size in bytes

                                 //'minSizeLimit'=>2*1024*1024,// minimum file size in bytes




And this is in PropertyController.php:

public function actionUpload()




                mkdir($tempFolder, 0777, TRUE);

                mkdir($tempFolder.'chunks', 0777, TRUE);




                $uploader = new qqFileUploader();

                $uploader->allowedExtensions = array('jpg','jpeg');

                $uploader->sizeLimit = 2 * 1024 * 1024;//maximum file size in bytes

                $uploader->chunksFolder = $tempFolder.'chunks';


                $result = $uploader->handleUpload($tempFolder);

                $result['filename'] = $uploader->getUploadName();

                $result['folder'] = $webFolder;




                header("Content-Type: text/plain");

                $result=htmlspecialchars(json_encode($result), ENT_NOQUOTES);

                echo $result;



The Upload File button renders fine and I can select an image to upload but I just get the upload failed message. Any help would be greatly appreciated.

Thanks in advance.

I am trying very hard and stuck just as you do. After many try and error, I managed to get it to work although still not perfect. Here is what you should do

Comment out

                mkdir($tempFolder, 0777, TRUE);

                mkdir($tempFolder.'chunks', 0777, TRUE);


                $result['folder'] = $webFolder;

The reason is because these lines of code will throw a warning and hence will halt the execution of the script.

Next, you have to go to your webroot, create a folder call upload and inside the folder upload, create 2 folders call temp and chunks respectively

Now go back and try to upload again

For anyone else who might step into the same trap as is did :)

In the widget it has to be:




as it is in the example on the extension-page.

There are many reasons that lead to your error.

  • folder permission (777)

  • utf-8 filename

  • cookie modify header if you call this afterload

  • multiple call causes duplicate js variable.


Hope this could help.