I have a image upload along with title and description in Node/Express using Multer to handle the uploads. But the issue is when the title and description is not present i need to stop the file upload. For example when a valid image and no title or description is given, multer first uploads the image in server and only then i can able to validate the title, description and send the response. How to prevent this behavior? If a valid image and no title/description is passed then just send the response 'title/description is required' and no need to upload the image.
Sorry if the question is not related to the video. I'm trying to follow docs of apollo angular for installing apollo client with angular but it gave me version incompatibility. Any clue ?
@@MonsterlessonsAcademy Hm, Node has support for ESM from v 13.2. All you need is to add "type":"module" to package.json I've just checked. (or to use .mjs extension but this looks strange imo )
WATCH NEXT: React Interview Questions and Answers - Dominate Your Next Interview - th-cam.com/video/yQHr4opz_N0/w-d-xo.htmlsi=51b2XP_84GH3q6oF
I have a image upload along with title and description in Node/Express using Multer to handle the uploads.
But the issue is when the title and description is not present i need to stop the file upload. For example when a valid image and no title or description is given, multer first uploads the image in server and only then i can able to validate the title, description and send the response. How to prevent this behavior?
If a valid image and no title/description is passed then just send the response 'title/description is required' and no need to upload the image.
Thank you, very easy to understand and helps me a lot.
Glad to hear that!
Sorry if the question is not related to the video. I'm trying to follow docs of apollo angular for installing apollo client with angular but it gave me version incompatibility. Any clue ?
Thanks for the video! I'm curious why you don't use ES modules syntax for the Node part?
Because it is not the default behaviour and I don't see any simple method to do that except of using typescript.
@@MonsterlessonsAcademy Hm, Node has support for ESM from v 13.2. All you need is to add "type":"module" to package.json I've just checked. (or to use .mjs extension but this looks strange imo )
@@tehawanka31 Just tried it. Works. Thanks!
Good video, could you make a similar one for angular but with a put request? Posts are simple
I will add it to the list of video ideas.
Thanks for video. I always wonder why you speak with Russian accent?
Because I'm from Ukraine and I speak russian my whole life.
@@MonsterlessonsAcademy наші 🤝 Привіт з Щенезламної!