Redirect From Multer Node Js

I want to direct the callback result directly to my index page. like this example, but I am confused how to direct it.

example link: res.redirect ('/ Master / Index? toast =' + 'Wrong extension type' ');

this is my code

var upload = multer ({
     storage: storage,
     fileFilter: function (req, file, callback) {// file filter
         var xlsFilterUrlIndex = xlsFilterUrl.indexOf (req.originalUrl);
         if (xlsFilterUrlIndex> = 0) {
             if (['xls', 'xlsx']. indexOf (file.originalname.split ('.') [file.originalname.split ('.'). length - 1]) === -1) {
                 return callback ('Wrong extension type');
             }
         }
         callback (null, true);
     }
}). any ();