Simplify file returns

This commit is contained in:
crobibero
2020-09-01 19:27:57 -06:00
parent c473645f9d
commit ec2a5e4fb0
5 changed files with 8 additions and 10 deletions

View File

@@ -214,9 +214,8 @@ namespace Jellyfin.Api.Controllers
{
return Redirect("index.html?start=wizard#!/wizardstart.html");
}
var stream = new FileStream(_resourceFileManager.GetResourcePath(basePath, path), FileMode.Open, FileAccess.Read);
return File(stream, MimeTypes.GetMimeType(path));
return PhysicalFile(_resourceFileManager.GetResourcePath(basePath, path), MimeTypes.GetMimeType(path));
}
/// <summary>