export const csvFileFilter = (
  req: Request,
  file: Express.Multer.File,
  callback,
) => {
  if (!file.originalname.match(/\.(csv)$/i)) {
    return callback(new Error('Only csv files are allowed!'), false);
  }
  callback(null, true);
};

export const zipFileFilter = (
  req: Request,
  file: Express.Multer.File,
  callback,
) => {
  if (!file.originalname.match(/\.(zip)$/i)) {
    return callback(new Error('Only zip files are allowed!'), false);
  }
  callback(null, true);
};
