
const multer =require('multer');

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

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

module.exports = multer({storage});