Add download links
This commit is contained in:
@@ -94,10 +94,13 @@ namespace LeafWeb.Web.Controllers
|
||||
|
||||
private Bitmap CombineBitmaps(IList<Bitmap> bitmaps, int columnCount = 2)
|
||||
{
|
||||
if (!bitmaps.Any())
|
||||
return null;
|
||||
// bitmaps assumed to have same dimensions, use the first one to define that
|
||||
var cellWidth = bitmaps[0].Width;
|
||||
var cellHeight = bitmaps[0].Height;
|
||||
var width = cellWidth * 2;
|
||||
var height = cellHeight * bitmaps.Count / 2;
|
||||
var width = cellWidth * columnCount;
|
||||
var height = cellHeight * bitmaps.Count / columnCount;
|
||||
|
||||
var combinedBitmap = new Bitmap(width, height);
|
||||
using (var g = Graphics.FromImage(combinedBitmap))
|
||||
|
||||
@@ -100,6 +100,7 @@ namespace LeafWeb.Web.Controllers
|
||||
return View("Index", viewModel);
|
||||
}
|
||||
|
||||
// Callback from Piscal
|
||||
public void NotifyComplete()
|
||||
{
|
||||
HangfireStartup.TriggerPiscalProcessQueue();
|
||||
|
||||
@@ -19,9 +19,12 @@ namespace LeafWeb.Web.Controllers
|
||||
}
|
||||
|
||||
[ActionLog]
|
||||
public FileContentResult DownloadResults(int id)
|
||||
public ActionResult Download(string token)
|
||||
{
|
||||
var leafInput = DataService.GetLeafInput(id);
|
||||
var leafInput = DataService.GetLeafInput(token);
|
||||
|
||||
if (leafInput == null)
|
||||
return View("DownloadNotFound");
|
||||
|
||||
var zip = leafInput.GetOutputFileZip();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user