Plupload_start not working

893 views Asked by At

I have an odd problem, I want to upload files with plupload.ui to my server. So my init script is like example on plupload site:

$(document).ready(function(){
    var url = adminUrl +'/data/upload-users/';
    var upload = $("#uploader").plupload({
        // General settings
        runtimes : 'html5,html4',
        url : url,

        // Maximum file size
        max_file_size : '2mb',

        chunk_size: '1mb',

        // Resize images on clientside if we can
        // Specify what files to browse for
        filters : [
            {title : "Image files", extensions : "jpg,gif,png"},
            {title : "Zip files", extensions : "zip,avi"}
        ],

        // Rename files by clicking on their titles
        rename: true,

        // Sort files
        sortable: true,

        // Enable ability to drag'n'drop files onto the widget (currently only HTML5 supports that)
        dragdrop: true,

        // Views to activate
        views: {
            list: true,
            thumbs: false, // Show thumbs
            active: 'list'
        }
    });
});

And I have include all files:

<script src="/js/plupload/plupload.full.min.js" type="text/javascript"></script>
<script src="/js/plupload/jquery.ui.plupload/jquery.ui.plupload.js" type="text/javascript"></script>

But when I click on the Start Upload button nothing happens, not even an error is fired. In firebug the html line where this button is located is hightlined so I think "click" is working fine.

Form for uploading is generated, even drag&drop is working (thumbnail is generated, shown filed size after drop etc);

I also tried setting uploader to variable and manually binding event to button:

var uploader = $('#uploader').pluplad({...});
$('body').on('click','#upload_start',function(e){
    uploader.start();
});

But nothing happened. Any suggestions why this is happening, anybody else had same problem?

0

There are 0 answers