{
cb(null, "./uploads");
},
filename: function (req, file, cb) {
cb(null, file.fieldname + "-" + Date.now());
},
});
Like this?
after inerting this code the filename changes to a string with a date.
Try: cb(null, Date.now() + '-' + file.originalname);
It worked👏👏
Hint: it's NOT "featured"
Обсуждают сегодня