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.

229 votes
15 answers
293k views

Node Multer unexpected field

I'm working on uploading a file to my app using the multer npm module. The multer function I have defined is to allow a single file uploaded to the file system. Everything works during run time; the ...
Sethe23's user avatar
  • 2,642
151 votes
6 answers
191k views

How to find the size of the file in Node.js?

I am using multer for uploading my images and documents but this time I want to restrict uploading if the size of the image is >2mb. How can I find the size of the file of the document? So far I tried ...
Daniel's user avatar
  • 2,089
88 votes
18 answers
116k views

How to store a file with file extension with multer?

Managed to store my files in a folder but they store without the file extension. Does any one know how would I store the file with file extension?
user3355603's user avatar
  • 1,161
66 votes
8 answers
145k views

express (using multer) Error: Multipart: Boundary not found, request sent by POSTMAN

Notice: only when I use form-data body form in Postman (which is the form I have to use because I want to send files beside text fields), I get: Error: Multipart: Boundary not found. when I use x-...
user avatar
49 votes
3 answers
109k views

How to limit the file size when uploading with multer?

I'm making a simple file upload system with multer: var maxSize = 1 * 1000 * 1000; var storage = multer.diskStorage({ destination: function (req, file, callback) { callback(null, 'public/...
Merijn de Klerk's user avatar
43 votes
7 answers
54k views

Cannot app.use(multer). "requires middleware function" error

I'm just starting learning NodeJS and I am stuck with a problem. I would like to upload files to my server. To do so I searched and found out this module multer. Doing as the example on GitHub works: ...
João Menighin's user avatar
42 votes
29 answers
73k views

ENOENT: no such file or directory .?

This is error which am getting while post data and file. I have followed 'academind' tutorial for building Restful API services, also i have been searching answer for this type of errors but nothing ...
codedamn's user avatar
  • 841
42 votes
8 answers
99k views

Uploading image to amazon s3 using multer-s3 nodejs

I am trying to upload an image to amazon s3 using multer-s3, but I am getting this error: TypeError: Expected opts.s3 to be object node_modules/multer-s3/index.js:69:20 This is my server code: ...
mBlaze's user avatar
  • 421
41 votes
6 answers
39k views

Node.js, multer and req.body empty

Here it is my problem, I have a form where I can insert a file and a field but I receive only the file and not the parameter test! Why? This is my code: app.js: var express = require('express'); ...
Filippo1980's user avatar
  • 2,745
39 votes
7 answers
97k views

Uploading multiple files with multer, but from different fields?

How can I have multer accept files from multiple file type fields? I have the following code that uploads a single file, using multer in node.js: var storage = multer.diskStorage({ destination: ...
Andre M's user avatar
  • 7,228
37 votes
6 answers
74k views

Node/Multer Get Filename

I am using the following to upload files to a directory via Multer. It works great, but I need to perform some actions after upload that require the name of the file I just posted to the "upload" ...
Kode's user avatar
  • 3,173
37 votes
1 answer
30k views

Node JS AWS S3 file upload. How to get public URL response

I'm uploading a file to Amazon S3 using the Node SDK. The file uploads are working fine, but I want to get the public url of the file to send back to the client. At the moment the response I get is: ...
Jack Wild's user avatar
  • 2,112
28 votes
18 answers
56k views

Unexpected end of form error when using Multer

I'm trying to upload an image (jpg/jpeg/png) from the browser to NodeJS. I have read through several tutorials and many posts on forums but very few seem to have this specific issue. I've made sure ...
Updog's user avatar
  • 411
27 votes
3 answers
16k views

Multer create new folder with data

I use multer. Question 1 When I put the following snippet in the app.js app.use(multer({ dest: './uploads' } ).single('file')); it creates a new folder under the root folder, my question ...
user avatar
24 votes
11 answers
48k views

multer - req.file always undefined

I've looked at a lot of answer for this same question, but I haven't found a working solution yet. I am trying to make a web app that you can upload files to using express and multer, and I am having ...
mlamp's user avatar
  • 783

15 30 50 per page
1
2 3 4 5
219