Closed manuelbamise closed 3 months ago
there's a problem with this feature, it doesn't pass the file through to the api
I have this project i was working on
@UploadedFile() file: Express.Multer.File, // @Res() res: Response, ) { try { if (file) { console.log(file); } else { console.log('Error uploading file'); console.log(file); // throw new Error("File didn't get uploaded"); } } catch (error) { console.log(error); // res.status(400).send({ error: error.message }); } }
using nestjs, i tried to send a file using the multipart form, it was just giving errors.
i found out how to fix it, i just set the key name to the value in FileInceptor(name)
FileInceptor(name)
Sending a file through the multipart Form
there's a problem with this feature, it doesn't pass the file through to the api
I have this project i was working on
using nestjs, i tried to send a file using the multipart form, it was just giving errors.