diff options
| author | crobibero <cody@robibe.ro> | 2020-09-01 19:27:57 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-09-01 19:27:57 -0600 |
| commit | ec2a5e4fb03ace8182b80ef81151bda6021051c4 (patch) | |
| tree | 0f6029595c91bd83455f245d2d04cbab060230d8 /Jellyfin.Api/Controllers/DashboardController.cs | |
| parent | c473645f9dc6c46f5148c7a27ec612a4c62502b8 (diff) | |
Simplify file returns
Diffstat (limited to 'Jellyfin.Api/Controllers/DashboardController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/DashboardController.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Jellyfin.Api/Controllers/DashboardController.cs b/Jellyfin.Api/Controllers/DashboardController.cs index c1bcc71e3..d20964d66 100644 --- a/Jellyfin.Api/Controllers/DashboardController.cs +++ b/Jellyfin.Api/Controllers/DashboardController.cs @@ -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> |
