Search WRM:

JavaScript Objects: FormData

By: Dusty Arlia
Published on Wednesday, January 1, 2014, 03:09 PM
Last Updated on Thursday, July 09, 2015 at 11:09 PM
Total Updates: 2

The FormDataJavaScriptobject is an HTTP multipart/form-data request body. This is a feature of XMLHttpRequest Level 2 (XHR2). FormData makes it easy to perform HTTP PUT requests with multipart/form-data encoding using an XMLHttpRequest. This is useful if you want to upload multiple File objects in a single request. Create a FormData object using the FormData()constructor like this: