diskStorage not a function
See original GitHub issueHi, i have following code
var express = require('express'); // call express
var app = express();
var multer = require('multer');
var storage = multer.diskStorage({
destination: function (req, file, cb) {
cb(null, '/software/')
},
filename: function (req, file, cb) {
cb(null, 'test.tar.gz')
}
})
var upload = multer({ storage: storage })
.....
This gives me following error while compiling:
var storage=multer.diskStorage({
^
TypeError: multer.diskStorage is not a function
at Object.<anonymous> (D:\Harvester\proxy\proxy.js:34:20)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:457:10)
at startup (node.js:136:18)
at node.js:972:3
Tried all variations but it gives me always the same error. Using node 5.0
Any idea??
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Multer upload is not a function - node.js - Stack Overflow
I'm using Multer to make an upload file system. I followed the instructions of the Github page but it's not working. const express=...
Read more >multer.diskStorage JavaScript and Node.js code examples
Best JavaScript code snippets using multer.diskStorage(Showing top 15 results out of 1,044) · Most used multer functions · Popular in JavaScript.
Read more >Express multer middleware
The disk storage engine gives you full control on storing files to disk. const storage = multer.diskStorage({ destination: function ...
Read more >Node.js – Multer upload is not a function - iTecNote
I followed the instructions of the Github page but it's not working. ... diskStorage({ destination: function (req, file, cb) { cb(null, '/uploads'); } ......
Read more >File uploads using Node.js - CodeForGeek
var storage = multer.diskStorage({ destination: function (req, file, callback) { callback(null, './uploads'); }, filename: function (req, file, callback) {
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is not working for me 😦
thanks LinusU