Questions tagged [multer]
Multer is a node.js component used to handle multipart/form-data uploads.
multer
212
questions
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:
...
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:
...
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?
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 ...
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 ...
15
votes
1
answer
18k
views
Sending canvas.toDataURL() as FormData
I am trying to use html2canvas to render a DOM element as a .png image, which I then want to upload to the server. Here is my code:
import React, { Component, PropTypes } from 'react';
import ...
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 ...
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-...
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/...
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: ...
8
votes
1
answer
13k
views
nodejs + multer + angularjs for uploading without redirecting
I am using Nodejs + Multer +angularjs for uploading files on the server.
i have a simple HTML file:
<form action="/multer" method="post" enctype="multipart/form-data">
<input type="file" ...
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 ...
7
votes
2
answers
13k
views
multer callbacks not working ?
Anyone knows why the "rename" function (and all other multer callbacks) are not working?
var express = require('express');
var multer = require('multer');
var app = express();
app.use(multer({
...
22
votes
3
answers
109k
views
Uploading multiple files with Multer
I'm trying to upload multiple images using Multer. It all works as expected except that only one file is being uploaded (the last file selected).
HTML
<form class='new-project' action='/projects' ...
20
votes
4
answers
47k
views
Filter files on the basis of extension using Multer in Express JS
As question title explains, I need to filter uploaded files on the basis of file extension. So, I went through the official docs and searched this website.
What I've Tried
I've tried solutions I ...