var imageBuffer = request.file.buffer; var imageName = 'public/images/map.png'; fs.createWriteStream(imageName).write(imageBuffer);