Move downloads to new controller
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using LeafWeb.Core.Entities;
|
||||
@@ -71,20 +72,5 @@ namespace LeafWeb.WebCms.Controllers
|
||||
select li;
|
||||
return View(viewModel);
|
||||
}
|
||||
|
||||
[ActionLog]
|
||||
public ActionResult Download(string token)
|
||||
{
|
||||
var leafInput = DataService.GetLeafInput(token);
|
||||
|
||||
if (leafInput == null)
|
||||
return View("DownloadNotFound");
|
||||
|
||||
var zip = leafInput.GetOutputFileZip(LeafOutputFileType.ToUser);
|
||||
|
||||
var filename = leafInput.Identifier.FilterValidFilename() + ".zip";
|
||||
|
||||
return new FileContentResult(zip, "application/zip") { FileDownloadName = filename };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user