I'm currently learning the MERN stack by making a project, one of this project's functionalities is to create a user profile, by doing so I needed ...
For further actions, you may consider blocking this person and/or reporting abuse
In case we follow this for update functionality, how to delete the images stored. I can only change the name for new image and its reference. Also the mango db is not used I guess in this case.
sure the image is not going to be stored in DB but the new unique name is going to be stored in database. Multer is storing the images in server folder... and you can delete images or any file by providing path and the name for that file can be access from database that you have stored when uploaded image
var fs = require('fs');
var filePath = 'c:/images/pic.png';
fs.unlinkSync(filePath);
req.file undefined
Make sure to add encType='multipart/form-data'
a few typos to fix :
setNewAuthor is not defined .. Where is that useState defined actually?
setNewAuthor = setNewUser
Thanks :)
req.file undefined
Make sure to add encType='multipart/form-data'
I added this still getting the error and also I'm not able to upload any image
This is what I needed.Thanks a lot,Ms. Skhiri.
req.file.filename show undefiend while post request in frontend . How can i solve this issue
How could to upload multiple images