GlobalRouter: Use PhysicalPath on allowed media.

This commit is contained in:
2018-11-11 14:54:48 +01:00
parent 86b5d82857
commit 576d27b460

View File

@@ -119,7 +119,7 @@ namespace VAR.Focus.Web
string extension = Path.GetExtension(context.Request.FilePath).ToLower();
if (Globals.AllowedExtensions.Contains(extension))
{
string filePath = context.Server.MapPath(string.Format("~/{0}", context.Request.FilePath));
string filePath = context.Request.PhysicalPath;
if (File.Exists(filePath))
{
StaticFileHelper.ResponseStaticFile(context, filePath);