I\'m seeming to have an issue with FormData being null. I\'m trying to upload files and JSON in a single POST request. I\'ve tried a variety of things, but nothing has seemed to
FormData
can't be inspected with console.log
without iterating.
Here is an article on how to inspect FormData
If you want to console.log
your FormData
object before doing the ajax post request, you can do something like this (I'm using the example from the source docs with your code):
var form = $('#uploadCSVWithData')[0];
var data = new FormData(form);
// Display the key/value pairs
for(var pair of data.entries()) {
console.log(pair[0]+ ', '+ pair[1]);
}