I have often tried to debug an instance of the FormData
object, but I can not see the values stored by the append
method.
I tried this:
f = new FormData();
f.append('name', 'Wallace Maxters');
f.append('image', $('#file').prop('files')[0]);
// tento obter o conteúdo adicionando
f.toString() //"[object FormData]"
console.log(f['name']) // undefined
How can I view the values I have stored inside an instance of the FormData
object? Is there any way to do this?
How would you remove the value "name" by adding it to the example object above?