Search Posts

Category: multer

how to save image to folder and save imagePaths to database in MEAN stack using Multer

I have a image collection of following schema: { “productId”: {type: String}, “imagePaths”: {type: Array} } I want to upload multiple images and store corresponding image-paths to database. I searched, and came to know that Multer can perform this action, but I am unable to upload and save image-paths for multiple images. I tried with this Angular code, scope.demoMethod = function(){ console.log(‘Method fired.’); var product = $scope.product; $http.post(‘/demo/upload’, $scope.product) .then(function (res) { console.log(‘Form Data ::’ […]