FormData.append("key", "value") is not working

The Solution to FormData.append("key", "value") is not working is

New in Chrome 50+ and Firefox 39+ (resp. 44+):

  • formdata.entries() (combine with Array.from() for debugability)
  • formdata.get(key)
  • and more very useful methods

Original answer:

What I usually do to 'debug' a FormData object, is just send it (anywhere!) and check the browser logs (eg. Chrome devtools' Network tab).

You don't need a/the same Ajax framework. You don't need any details. Just send it:

var xhr = new XMLHttpRequest;'POST', '/', true);


~ Answered on 2012-12-30 16:36:54

Most Viewed Questions: