Skip to content

Commit 41824bd

Browse files
author
shahriarsajeeb
committed
multer error fix done
1 parent 7e95dc0 commit 41824bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

backend/multer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
const multer = require("multer");
2+
const path = require("path");
23

34
const storage = multer.diskStorage({
45
destination: function (req,res,cb){
5-
cb(null, "./uploads");
6+
cb(null, path.join(__dirname, './uploads'));
67
},
78
filename: function (req,file,cb) {
89
const uniqueSuffix = Date.now() + "-" + Math.round(Math.random() * 1e9);

0 commit comments

Comments
 (0)