Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How to use blueimp file upload with phalcon?

Hello I want to use plugin with phalcon.Is it possible?How?

edited Oct '16

the 2 libraries has nothing in common but never the less .

                acceptFileTypes: /(\.|\/)(jpe?g|png)$/i,
                // The maximum allowed file size in bytes:
                maxFileSize: 10000000, // 10 MB
                // The minimum allowed file size in bytes:
                minFileSize: undefined, // No minimal file size
                maxNumberOfFiles: 10,
                dataType: 'json',
                url: /my controller action url,
                autoUpload: true
            }).on('fileuploadadd', function (e, data) {
            //fired before uploading begins or something like that, you can check the docs really...
            }).on('fileuploadprogressall', function (e, data) {

            //here i use it to show my progress bar
            }).on('fileuploaddone', function (e, data) {
                //caled when upload iis done , console.log(arguments)

for backend i use this helper library. There are some explanations there, here is my code just in case

            'directory' =>  $this->mainDir,
            'minsize'   =>  1000,
            'maxsize'   =>  10000000,// 10 MB
            'mimes'     =>  [
            'extensions'     =>  [
            'sanitize' => true,
            'hash'     => 'md5'

        if($this->uploader->isValid() === true) {


            $info = $this->uploader->getInfo()[0];

            $this->file = $info['path'];
            $this->fileName = $info['filename'];

and thats pretty much it