diff --git a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs index 6c37d5f7a4..396bd8e88d 100644 --- a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs +++ b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs @@ -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(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); } diff --git a/MediaBrowser.Api/Library/LibraryService.cs b/MediaBrowser.Api/Library/LibraryService.cs index 80d8c072ee..3bb119cbae 100644 --- a/MediaBrowser.Api/Library/LibraryService.cs +++ b/MediaBrowser.Api/Library/LibraryService.cs @@ -512,10 +512,6 @@ namespace MediaBrowser.Api.Library var headers = new Dictionary(); - // Quotes are valid in linux. They'll possibly cause issues here - var filename = Path.GetFileName(item.Path).Replace("\"", string.Empty); - headers["Content-Disposition"] = string.Format("attachment; filename=\"{0}\"", filename); - if (user != null) { LogDownload(item, user, auth); diff --git a/SharedVersion.cs b/SharedVersion.cs index a576941abd..6cb425df1e 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.25.7")] +[assembly: AssemblyVersion("3.2.25.8")]