简体   繁体   中英

Jquery File Upload Plugin Progress Bar

This plugin manages file uploads in a webpage and can add a lot of UI elements to the upload process.

You create an input file type element and then strap the js files, use the instantiating code and walla. There are options and API instructions for accomplishing different features.

Problem:

I want to implement a progress bar for file uploads but so far there is no real instruction on how to do that in the docs.

I found one option you can set by pasting this code in:

progress: function (e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10); }

But doing that it has not changed anything. Can someone who understands javascript please help me find out how to get a progress bar implemented?

Thank you.

Okay, after talking to the programmer for the plugin on Github he has added a section in the docs to include instructions for implementing a progress bar for the basic setup.

The convo between me and him is here: https://github.com/blueimp/jQuery-File-Upload/issues/1451#issuecomment-6869829

The solution in the docs is here: https://github.com/blueimp/jQuery-File-Upload/wiki/Basic-plugin

From https://github.com/blueimp/jQuery-File-Upload/wiki/Extended-progress-information It looks like the jQuery UI version is different from the jQuery basic version of the plugin. Which version are you using? You can obviously see on that page the method for accessing the info in the basic jQuery version, and it claims that in the UI version you can get progress info automatically.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM