diff options
| author | crobibero <cody@robibe.ro> | 2020-09-01 17:31:31 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-09-01 17:31:31 -0600 |
| commit | c473645f9dc6c46f5148c7a27ec612a4c62502b8 (patch) | |
| tree | fe89137cd1cc7e7d74edae51a0e376296b0af151 /Jellyfin.Api/Controllers/RemoteImageController.cs | |
| parent | c98952937e463c842fc28f8595caddb511319fc8 (diff) | |
Set openapi schema type to file where possible
Diffstat (limited to 'Jellyfin.Api/Controllers/RemoteImageController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/RemoteImageController.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/RemoteImageController.cs b/Jellyfin.Api/Controllers/RemoteImageController.cs index 30a4f73fc..e8c5ba7a9 100644 --- a/Jellyfin.Api/Controllers/RemoteImageController.cs +++ b/Jellyfin.Api/Controllers/RemoteImageController.cs @@ -7,6 +7,7 @@ using System.Net.Http; using System.Net.Mime; using System.Threading; using System.Threading.Tasks; +using Jellyfin.Api.Attributes; using Jellyfin.Api.Constants; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller; @@ -154,6 +155,7 @@ namespace Jellyfin.Api.Controllers [Produces(MediaTypeNames.Application.Octet)] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status404NotFound)] + [ProducesImageFile] public async Task<ActionResult> GetRemoteImage([FromQuery, Required] string imageUrl) { var urlHash = imageUrl.GetMD5(); @@ -191,7 +193,7 @@ namespace Jellyfin.Api.Controllers } var contentType = MimeTypes.GetMimeType(contentPath); - return File(System.IO.File.OpenRead(contentPath), contentType); + return PhysicalFile(contentPath, contentType); } /// <summary> |
