TFS_ANTIGUO/SIGPC/Scripts/upload.js
kledezma 290b81b54d SIGPC
git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C518
2021-01-22 14:59:35 +00:00

25 lines
No EOL
872 B
JavaScript

$(function () {
$('#btnFileUpload').fileupload({
url: '/FileUploadHandler.ashx?upload=start&cedula=' + $("#txtCedulaPropietario").val(),
add: function (e, data) {
console.log('add', data);
$('#progressbar').show();
data.submit();
},
progress: function (e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10);
$('#progressbar div').css('width', progress + '%');
},
success: function (response, status) {
$('#progressbar').hide();
$('#progressbar div').css('width', '0%');
console.log('success', response);
},
error: function (error) {
$('#progressbar').hide();
$('#progressbar div').css('width', '0%');
console.log('error', error);
}
});
});