Backport pull request #12490 from jellyfin/release-10.9.z

Set Content-Disposition header to attachment for image endpoints

Original-merge: 9645955629

Merged-by: crobibero <cody@robibe.ro>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
nielsvanvelzen
2024-08-25 02:46:38 -04:00
committed by Joshua M. Boniface
parent 2fd9418af0
commit cb83dc2664
3 changed files with 5 additions and 0 deletions

View File

@@ -233,6 +233,8 @@ public class PluginsController : BaseJellyfinApiController
return NotFound();
}
Response.Headers.ContentDisposition = "attachment";
imagePath = Path.Combine(plugin.Path, plugin.Manifest.ImagePath);
return PhysicalFile(imagePath, MimeTypes.GetMimeType(imagePath));
}