Better handling of static files.

This commit is contained in:
2018-03-17 19:54:58 +01:00
parent 3bacdae77e
commit 954c34b6e0
7 changed files with 109 additions and 17 deletions

View File

@@ -122,11 +122,7 @@ namespace VAR.Focus.Web
string filePath = context.Server.MapPath(string.Format("~/{0}", context.Request.FilePath));
if (File.Exists(filePath))
{
context.Response.Buffer = true;
context.Response.WriteFile(filePath);
context.Response.Flush();
context.Response.Close();
context.Response.End();
StaticFileHelper.ResponseStaticFile(context, filePath);
return;
}
}