# Multer posting twice when creating data

I don’t know why multer post my data twice here, What is wrong here? This outputs 2 results in my mongodb. I’ve been following solutions but it doesn’t do anything, any help

var storage = multer.diskStorage({
destination:function(req,file,cb){
cb(null,'./public/assets/images');
},
filename:function(req,file,cb){
if(!file.originalname.match(/.(png|jpg|jpeg)\$/)){
var err = new Error();
err.code = 'filetype';
return cb(err);
}else{
imageName =  "assets/images/" + Date.now() + '_' + file.originalname;
cb(null, Date.now() + '_' + file.originalname);
}
}
})