mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-31 17:41:29 +00:00
3.2.25.8
This commit is contained in:
parent
54b4608ce6
commit
dab74b9cd1
3 changed files with 10 additions and 5 deletions
|
|
@ -438,6 +438,15 @@ namespace Emby.Server.Implementations.HttpServer
|
|||
options.CacheKey = cacheKey.GetMD5();
|
||||
options.ContentFactory = () => Task.FromResult(GetFileStream(path, fileShare));
|
||||
|
||||
options.ResponseHeaders = options.ResponseHeaders ?? new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
// Quotes are valid in linux. They'll possibly cause issues here
|
||||
var filename = (Path.GetFileName(path) ?? string.Empty).Replace("\"", string.Empty);
|
||||
if (!string.IsNullOrWhiteSpace(filename))
|
||||
{
|
||||
options.ResponseHeaders["Content-Disposition"] = "inline; filename=\"" + filename + "\"";
|
||||
}
|
||||
|
||||
return GetStaticResult(requestContext, options);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue