Relative Content

Tag Archive for javascriptreactjsvalidationfrontenduse-form

req.file is empty or undefined

I want to use the useForm along with a validation system to save data using the append() function and send it to MongoDB with a fetch request. However, when I inspect the formData object, the error is “No files uploaded”

The formData object is always empty, so it’s not saving anything

I want to use the useForm along with a validation system to save data using the append() function and send it to MongoDB with a fetch request. However, when I inspect the formData object, it appears empty, and I receive a ‘no files uploaded’ error when I POST with fetch.