Open GrazielaSousa opened 1 year ago
try to send without the data field:
const result = await apiDocument.post('/upload', formData, { headers: { 'Content-Type': 'multipart/form-data', }, });
and verify if the api was called
@GrazielaSousa Have you found the fix,i am me facing the same issue
Hello, the file upload.js I put together the code routes, and worked, for some reason the code being separate it did not work properly
do the <input />
fields all have the same id
and name
? if so, try just having 1 <input />
field and see if that fixes it.
Hello, I’m having trouble getting a client-side post to work, it turns out that with Insomnia, the file correctly goes up to the directory and returns all the file information. The code is currently like this
upload.js
routes
Insomnia
When sending the file from the front:
Frontend