Friends, I'm using the jquery fileupload plugin and using the following callback:
jQuery("#fileupload").fileupload({
url: '/painel/uploads',
dataType: 'json',
formData: {_token: jQuery("#fileupload").data('token'), idpasta: jQuery("#list-id-client").html()},
done: function (e, data) {
},
progressall: function (e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10);
$('#progress .progress-bar').css(
'width',
progress + '%'
);
}
});
I am printing this request with the PHP command dd () and I realized that when I print "idpasta" I have the following scenario: sometimes the ID comes correctly and sometimes it comes with nothing, just an empty string.
I think it's an asynchronous request and I'm getting data from another jQuery component and this is giving me problems.
Is there anything that can be done? I need to get this client ID by jQuery ...
Thank you