javascript - jquery file upload progress bar inaccurate -


i using jquery file upload (http://blueimp.github.io/jquery-file-upload/) plugin.

my code:

$('#fileupload').fileupload({     url: 'server/index.php',     datatype: 'json',     dropzone: $('#dropzone'), }).bind('fileuploadprogress', function (e, data) {     var progress = parseint(data.loaded / data.total * 100, 10);     $('.progress-bar').css('width', progress + '%'); }); 

when file upload, progress bar inaccurate. every time when upload no matter size file is, progress bar stuck @ around 10% until file upload finish, directly goes 100%.

why behave that? how can fix display progress?

thank you.

i'm having file progress bar issue too. odd thing same implementation works on site have developed, not on another. odd may be, struggled hours trying find out going on. read problem somewhere , blueimp here says tested fine using similar setups, , mentioned had proxy. don't have proxy, checked on computer. works fine, yet computer, works fine again. disabled avg on main computer, , wouldn't know, works fine. seems avg enabled data.loaded same data.total. i'm sure has stupid cache or implement "boost" browsing speed.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -