# Category: multer

## I need to upload a file to server using angularJS, NodeJS and ExpresJS

I tried following this link https://ciphertrick.com/2015/12/07/file-upload-with-angularjs-and-nodejs/ but got error Node version is 4.4.7 modulerr error in ngFileUpload In controller I have var CIController = angular.module(‘CIController’, [‘ngMaterial’, ‘ngAnimate’, ‘ngAria’, ‘ngMessages’, ‘Alertify’, ‘ngFileUpload’]) .controller(‘childController’, [‘$scope’, ‘$location’, ‘$q’, ‘$timeout’, ‘$log’, ‘CIFactory’, ‘ClientConfig’, ‘Alertify’, ‘Upload’, ‘$window’, function($scope,$location, $q,$timeout, $log, CIFactory, ClientConfig, Alertify, Upload,$window) { // … } Source: AngularJS

## Multer – Node JS – Upload image AND data

Im trying to upload an image to my server using Node JS, Multer and Angular JS. The problem Im facing is no matter what I do, the “req.body” is always empty on server side. I need to send the image along with some information ( a password for instance ) but everything gets undefined when it reaches the server. The image is correctly getting uploaded nevertheless. Can someone advise how to send BOTH some data […]

## nodemailer & multer with attachment does not have callback on success

I followed the outline here to get multer setup: https://stackoverflow.com/a/32490790/5824563 to send an attachment with form. And then I checked others resources such as this: for how to get a callback using multer, but with no luck. I do not see any official documentation about sending a success callback back to the client side. I am using angular for the front end. The form emails fine including the attachment, but i’d like to know when […]

## 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 ::’ […]