Hi folks. I am using Formidable to upload files from the client to a Node.Js server and it works great. I would like to send the progress of the upload back to the client. The form.on('progress'... callback works as expected but I am not sure how to send that data to the client so it can show it in a progress bar. The client side is jade, jquery with ajax. In the following client side code the 'success' gets called successfully when node.js does the res.send(... on form.on('end'... Just not sure how to send the progress amounts from the server and receive on the client.
$.ajax({
url: formURL,
type: 'POST',
data: formData,
mimeType:"multipart/form-data",
contentType: false,
cache: false,
processData:false,
success: function(data, textStatus, jqXHR)
{
testUpdateDialog.dialog("close");
},
error: function(jqXHR, textStatus, errorThrown)
{
testUpdateDialog.dialog("close");
}
});
e.preventDefault(); //Prevent Default action.
Any help appreciated.
Thanks. Grant.