
const multer =require('multer');

const storage = multer.diskStorage({
    destination: (req, file, cb)=>{
        cb(null,'uploads/CI')

    },
    filename:(req,file,cb)=>{
        const ext = file.originalname.split('.').pop()
        cb(null, `${req.params.id}.${ext}`)
    }
});

module.exports = multer({storage});