Search code examples
jquery-file-uploadblueimp

First time file not uploading in blueimp Jquery File Upload


I am using Blueimp JqueryFileUpload, when i tried to upload my very first file its not uploading. But After i tried the same file or any file its working.

I can't figure out whats goes wrong for the very first upload.

While debugging i can found that the fileupload method not triggered for the first upload but followed consecutive uploads say second,third,.. its triggering

           $('#fileUpload').fileupload({
                url: 'home/upload',
                dataType: 'json',
                done: function (e, data) {
                   //do something
                }
            });

Solution

  • Are you generating the input file field after the page loads? I had the same issue because I forgot to initialize .fileupload() after the input field was appended.