How can i check whether the user has submitted file in the file input form in html when the user submits the form?
This is the app.post method in the index.js file which will receive the filename and I want to check if the image exists then the image name will be added to the file else it will not. app.post('/addPost', upload.single('blogImage'), (req,…