What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-02-11 11:50:02
UploadCsv.js:17 Uncaught TypeError: Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'.
var formData = new FormData(); formData.append("username", "Groucho"); formData.append("accountnum", 123456); // number 123456 is immediately converted to a string "123456" // HTML file input, chosen by user formD... Add solution -
Javascript 2021-11-08 11:26:12
uploading file with fetch
const handleImageUpload = event => { const files = event.target.files const formData = new FormData() formData.append('myFile', files[0]) fetch('/saveImage', { method: 'POST', body: formData }) .then(response => response.json())... Add solution