I am trying to send through dropzone a specific -already known- position ID of an image file to the backend, which is going to be uploaded on the server.
Although the formData.append()
is being used, I see that nothing is appended.Instead just this "FormData {}
" shows up.
dropzoneObject.on("sending", function(file, xhr, formData){
var nameOfFile = $(file.previewElement).find(".dz-filename").text();
var positionOfFile = fpos;
//console.log("The file who's being sent is named: "+nameOfFile+" and its position id is: "+positionOfFile);
formData.append("fpos", fpos);
});
I expect to see in example fpos=16;
See Question&Answers more detail:os