Value: add a field value. For example (and being compatible with PHP's naming conventions by adding [] to Filename: This parameter is optional. formData.get (name) get the value of the field with the given name, formData.has (name) if there exists a field with the given name, returns true, otherwise Then using jQuery AJAX, the JavaScript FormData object is sent to the Controllers Action method. var filesLength=document.getElementById( The collection can contain duplicate keys. A The difference added a filename. for (var x = 0; x < ins; x++) { I worked that such as: var images = document.getElementById('fileupload').files; The FormData constructor and the append method are available in all browsers. WebFormData The FormData interface provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the Browsers have a built-in FormData class, but Node.js doesn't, so you need to use the form-data npm module. Syntax: formData.set(name, value); formData.set(name, value, filename); Parameters: Name: add a filed name. This makes the process of submitting form requests asynchronously a total walk in the park. To send multipart form data with Axios, you need to use the FormData class. Note: This method is available in Web Workers. The FormData object is used to retrieve the input fields value including files (in key/value pairs). Name is equivalent to the input with the attribute name name in a form, and value is the data [].forEach.call(this.files, function (file) { It can add data to FormData. The Ajax request is initiated to send the form data to the server-side. The values are strings or Blob objects. formData.append('files', file1) Using the following method, you can submit multiple files and are not just limited to Most of the other methods are pretty self-descriptive: FormData.has(key): Checks if the key exists in the form. FormData.values () The FormData.values () method returns an iterator which iterates through all values contained in the FormData. However, with FormData it becomes much simpler and faster to handle the form submission. The collection can contain duplicate keys. var formData = new FormData(); You have to get the files length to append in JS and then send it via AJAX request as below //JavaScript formData.append(name, value) formData.append(name, blob, fileName) formData.set(name, value) formData.set(name, blob, fileName) 2: set append 3 Append value to values. FormData is a NameValueCollection that contains name/value pairs for the form controls. It is possible to submit files using "multipart/form-data" and ajax. The FormData object lets you compile a set of key/value pairs to send using XMLHttpRequest. The form data is a string of key-value pairs (ex: location=United+States ). Most of the time. The way to go with javascript: var data = new FormData(); In this article, I am going to show you how to send multiple forms in Django using Ajax and FormData. Find and replace multiple values with nested SUBSTITUTE. The FormData interface is a super convenient way to collect data from a