3 examples of 'new formdata' in JavaScript

Every line of 'new formdata' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
15public data(): FormData {
16 var fd = new FormData();
17 this._data.forEach(d => {
18 if (d.blobName)
19 fd.append(d.name, d.value, d.blobName);
20 else
21 fd.append(d.name, d.value);
22 });
23 return fd;
24}
62function getFormData(file: File) {
63 const formData = new FormData();
64
65 formData.append('file', file);
66
67 return formData;
68}
14constructor() {
15 this._data = new Map()
16}

Related snippets