瀏覽代碼

Fixed downloads

pull/29/head
Teknikode 6 年前
父節點
當前提交
5dcc2d9eeb
  1. 2
      Teknik/Areas/Upload/Controllers/UploadController.cs
  2. 2
      Teknik/Filters/TrackingFilterAttribute.cs

2
Teknik/Areas/Upload/Controllers/UploadController.cs

@ -199,7 +199,7 @@ namespace Teknik.Areas.Upload.Controllers @@ -199,7 +199,7 @@ namespace Teknik.Areas.Upload.Controllers
Response.AddHeader("Accept-Ranges", "0-" + upload.ContentLength);
// check to see if we need to pass a specified range
if (!byRange)
if (byRange)
{
long anotherStart = startByte;
long anotherEnd = endByte;

2
Teknik/Filters/TrackingFilterAttribute.cs

@ -21,7 +21,7 @@ namespace Teknik.Filters @@ -21,7 +21,7 @@ namespace Teknik.Filters
public override void OnActionExecuted(ActionExecutedContext filterContext)
{
string title = string.Empty;
if (filterContext.Controller.ViewBag != null)
if (filterContext.Controller != null && filterContext.Controller.ViewBag != null && filterContext.Controller.ViewBag.Title != null)
{
title = filterContext.Controller.ViewBag.Title;
}

載入中…
取消
儲存