Hi! first of all sorry for using the issues as a way to have some help, i've been trying to find a clear answer for more than a week and couldn´t...
i think it's easy but i have just not being able to resolve this...
so until now i was uploagind only pnj files. now i want to upload pnj and pdf... front part is working already but i have a problem in my back-end and i don't understand how to do this. couldn't find any exemple either....
should i make 2 if? 2 different try?
it has something to do with the mimetype?
Hi! first of all sorry for using the issues as a way to have some help, i've been trying to find a clear answer for more than a week and couldn´t...
i think it's easy but i have just not being able to resolve this...
so until now i was uploagind only pnj files. now i want to upload pnj and pdf... front part is working already but i have a problem in my back-end and i don't understand how to do this. couldn't find any exemple either....
should i make 2 if? 2 different try? it has something to do with the mimetype?
im lost
export const uploadImageForTechnialReport = async (req, res) => { try { if (!req?.files?.image) return res.status(422).jsonp("NO_IMAGE_PROVIDED");
} catch (err) { return res.status(400).send(
AN_ERROR_OCCURED_${err.message}
); } };