View JS function:-
DownloadZipFile: function (filePath) {
var model = { FilePath: filePath};
$app.post('/Admin/DownloadZipFile', model).then(function (response) {
if (!response.status) {
$app.messageBox.error("File not found");
}
});
}
API Controller:-
public ActionResult DownloadZipFile(TemplateFileModel model)
{
// Code here
}