after posting a form and before saving the image ( uploaded from the form), I want to resize it so that when it will be using it, it will be shown with the right size on the website.
const fileStorageEngine = multer.diskStorage({
destination: (req,file,cb)=>{
cb(null, "./public/images");
},
filename: (req,file,cb)=>{
cb(null, `${Date.now()}--${file.originalname}`);
}
});
this is my code defining destination and filename, I was wondering where could I check for it's size.