import multer from "multer";
import path from "path";

const storage = multer.diskStorage({
	destination: function (req, file, cb) {
		cb(null, "uploads/blog");
	},

	filename: function (req, file, cb) {
		const fileName = Date.now() + path.extname(file.originalname);
		cb(null, fileName);
	},
});

export const upload = multer({storage});
