We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e95dc0 commit 41824bdCopy full SHA for 41824bd
backend/multer.js
@@ -1,8 +1,9 @@
1
const multer = require("multer");
2
+const path = require("path");
3
4
const storage = multer.diskStorage({
5
destination: function (req,res,cb){
- cb(null, "./uploads");
6
+ cb(null, path.join(__dirname, './uploads'));
7
},
8
filename: function (req,file,cb) {
9
const uniqueSuffix = Date.now() + "-" + Math.round(Math.random() * 1e9);
0 commit comments