Fix in posting
This commit is contained in:
parent
fc5fff5703
commit
31d08f15d8
1 changed files with 17 additions and 0 deletions
17
posting2.js
17
posting2.js
|
|
@ -23,6 +23,23 @@
|
|||
|
||||
}
|
||||
|
||||
var xhr=false;
|
||||
|
||||
if(!options.hasOwnProperty("upload")) {
|
||||
|
||||
xhr = $.ajaxSettings.xhr();
|
||||
xhr.upload.onprogress = function (event) {
|
||||
|
||||
if(event.lengthComputable) {
|
||||
|
||||
$("#loaded_n_total").html("Uploaded "+event.loaded+" bytes of "+event.total);
|
||||
var percent = (event.loaded / event.total) * 100;
|
||||
$("#progressBar").val(Math.round(percent));
|
||||
$("#status").html(Math.round(percent)+"% uploaded... please wait");
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
$(this).on('submit', function (e) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue