FormData.append()
The append() method of the FormData interface appends a new value onto an existing key inside a FormData object, or adds the key if it does not already exist.
Syntax
append(name, value)
append(name, value, filename)
Parameters
name- : The name of the field whose data is contained in
value.
- : The name of the field whose data is contained in
value- : The value of the field. This can be a string or a
Blob(including subclasses such asFile). If none of these, the value is converted to a string.
- : The value of the field. This can be a string or a
filenameoptional- : The filename reported to the server when a
BloborFileis passed as the second parameter. The default filename forBlobobjects is "blob". The default filename forFileobjects is the file's filename.
- : The filename reported to the server when a
Return value
undefined