Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [multer]

Multer is a node.js component used to handle multipart/form-data uploads.

1 vote
0 answers
181 views

Getting file name from body parser

Can I get the name from body parser from multipart form post? Using Multer, I can get the files uploaded, but I just want the name? Use hidden file? but how? I am using Jasny Boostrap for file ...
Alvin's user avatar
  • 8,439
8 votes
4 answers
10k views

Node.js and Multer - Handle the destination of the uploaded file in callback function (req,res)

I'm new to Node.js and I ran into a simple problem lately. I'm using multer module to upload images. In my web app all the users have a unique id, and I want the uploaded images to be stored in a ...
Light Flow's user avatar
3 votes
2 answers
4k views

MongoError when uploading a file using mongoose, gridfs-stream and multer

I am running express 4 using multer, gridfs-stream and mongoose with mongodb and I am attempting to upload a file and stream it to gridfs. The express route that does this is defined as: app.post('/...
KennyE's user avatar
  • 513
2 votes
3 answers
6k views

Node.js - expressjs - multer req.files outputs empty

i'm using multer to get a file from this form <form action="/api/pimage" method="POST" enctype="multipart/form-data"> <fieldset> <input type="file" name="profileimage"> ...
iJumbo's user avatar
  • 21
0 votes
2 answers
2k views

Using multer in memory buffer with GraphicsMagick

I'm trying to resize an image uploaded in memory, using multer over express to get the file. While I can access req.files.picture.buffer and it shows some content, when I pass the buffer to GM I ...
JayC's user avatar
  • 2,024
3 votes
3 answers
911 views

Express js 4 and multer

I'm writing a Node js application which handles multipart form data and so I'm using multer for the purpose. The problem is that req.body is always undefined. Here is my code: var app = express(); ...
Eric's user avatar
  • 488
2 votes
1 answer
3k views

Multer not uploading files when I include logic in onFileUploadStart() - NodeJs

I'm trying to use multer to upload only image files with node File's upload successfully with this: app.use(multer({ dest: __dirname + '/public/uploads/', onFileUploadData: function (file, data) { ...
mmm's user avatar
  • 2,297
1 vote
0 answers
277 views

Angular not POSTing multipart data so express doesn't receive a thing?

I have a form with 2 file and a text area to post to the serverside made with node.js to handle the upload part on node/express(4.0) I used multer. While to handle the upload from the angular side I ...
holographix's user avatar
  • 2,527
12 votes
2 answers
21k views

Reading contents of csv file in node.js

I am trying to implement a module in nodejs(just started working in nodejs) which has requirement below as Upload .csv file. Read content of the csv file. Frameworks currently being used for restful ...
Mozak's user avatar
  • 2,778
3 votes
1 answer
4k views

Express 4: How to upload file to memory (e.g. as a UTF-8 string) rather than disk?

I have an Express 4 application which needs to process data files uploaded by users and return an output. The files are relatively small (1-2 MB), so I'd like to upload them directly to memory (e.g. ...
user456584's user avatar
  • 88.3k
1 vote
2 answers
3k views

File Upload Failure

I am trying to upload file using Ajax to a Nodejs Server. Ajax Code: var url = 'http://<ip:port>/upload/'; var formValues = $("#files").get(0).files; $.ajax({ url: url, type: 'POST', ...
jeevs's user avatar
  • 261
14 votes
6 answers
39k views

How to set different destinations in nodejs using multer?

I'm trying to upload any file using Multer package. It's working fine when I use following code in my server.js file. var express = require('express'), app = express(), multer = require('...
AkshayP's user avatar
  • 2,159
8 votes
3 answers
9k views

Nodejs Express 4 Multer | Stop file upload if user not authorized

I'm using multer as multipart middelware for express4. Express is configured to use passport as auth middelware, but I cannot find a way to prevent file upload if the user is not authenticated. I ...
LorenzoGi's user avatar
  • 266
23 votes
6 answers
18k views

Can we configure multer to not store files locally and only for using req.files.image.path?

My application's need is as follows: I upload the image to Cloudinary and store the url of image in my mongodb database. To upload the image to cloudinary, I needed to give the file path, and for ...
Aravind's user avatar
  • 3,171
0 votes
2 answers
6k views

file upload error in node.js

To upload a file in node.js express I am using multer module. The code itself in a separate file is working like charm. but if I place the same code in my project(html code in one file and routing in ...
Gopi's user avatar
  • 702

15 30 50 per page