tors / jquery-fileupload-rails

jQuery File Upload integrated for Rails
669 stars 254 forks source link

progress bar is not showing any change in progress #61

Closed jakehockey10 closed 9 years ago

jakehockey10 commented 10 years ago

Hello! Thanks for the great gem! I love this! I'm hoping I can figure out basically the only issue I'm having with it: I can't get the progress bar to do what I see it do any every example application I've seen using this gem. The upload is working, multiple files is working, the file name and progress bar appears when I use the OS dialogue to choose the files. I even verified that the data.loaded reaches data.total. But the progress bar does not fill with a different color. The css width property gets set to 100% from 0% like it is supposed to. What I'm wondering is if the progress is reaching 100% before the progress bar shows up because I placed jquery statements to display the data.loaded and data.total values every time the progress portion of the fileupload method gets called and those values only appear once and data.load is already the same as data.total.

Does anyone have an idea of what could be going wrong? I'm not sure how to debug this...

digitalfrost commented 10 years ago

Are you still experiencing this issue? Both the Rails 3 example App https://github.com/tors/jquery-fileupload-rails-paperclip-example and my Rails 4 fork https://github.com/digitalfrost/jquery-fileupload-rails-paperclip-example/tree/upgrade_to_rails_4 have a progress bar that works correctly for me.

ferdinandrosario commented 9 years ago

Hi @digitalfrost me too facing the same issue of @jakehockey10 I think both of us are trying to show the progress count from 0% to 100%, unfortunately I couldn't find the progress count value in your repo.

Using the following script I tried for progress bar but couldn't success with that

$('#fileupload').fileupload({
    /* ... */
    progressall: function (e, data) {
        var progress = parseInt(data.loaded / data.total * 100, 10);
        $('#progress .bar').css(
            'width',
            progress + '%'
        );
    }
});
jakehockey10 commented 9 years ago

Thanks for the response. Sorry I haven't responded right away, I have been pulled to other projects. As soon as I can, I will attempt to reimplement what I'm doing in hopes of avoiding the same mistake I made previously. I will keep you posted. Thanks again!

felixbuenemann commented 9 years ago

Where you using IE8? When using the iframe transport the per file progress jumps form 0% to 100% with no immediate steps.

felixbuenemann commented 9 years ago

Closing for lack of feedback, please open a new isssue if this still happens with 0.4.2 on browsers that do support XHR uploads.

Hareramrai commented 8 years ago

Hi @felixbuenemann

For me it's not working in IE 9, could you please suggest me any solution for it.

Thanks, Hare

felixbuenemann commented 8 years ago

It seems IE9 does not support XHR uploads, just like IE8:

http://caniuse.com/#feat=xhr2

Hareramrai commented 8 years ago

@felixbuenemann Is there any patch for progress bar to work ?

felixbuenemann commented 8 years ago

I don't think so, try the demos linked from https://github.com/blueimp/jquery-file-upload. This repo just contains the library repackaged as a ruby gem. To get upload progress on IE9 you'll likely have to use Flash and something like uploadify or swfupload. Unless you have a significant number of IE9 users I wouldn't bother with that.