Skip to content

Instantly share code, notes, and snippets.

@16pxdesign
Created April 20, 2019 21:41
Show Gist options
  • Save 16pxdesign/c76b816c72e4d9a832222d5b8ae16a49 to your computer and use it in GitHub Desktop.
Save 16pxdesign/c76b816c72e4d9a832222d5b8ae16a49 to your computer and use it in GitHub Desktop.
xd
$.ajax({
xhr: function () {
var xhr = $.ajaxSettings.xhr();
xhr.upload.onprogress = function (e) {
console.log(Math.floor(e.loaded / e.total * 100) + '%');
};
return xhr;
},
contentType: false,
processData: false,
type: 'POST',
data: data,
url: '/ControllerX/' + bid,
success: function (response) {
location.href = 'xxx/Index/';
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment