Skip to content

Commit

Permalink
Merge pull request #73 from Macro-Deck-App/adjust-icon-content-dispos…
Browse files Browse the repository at this point in the history
…ition

Adjust icon content disposition
  • Loading branch information
manuelmayer-dev committed Oct 15, 2023
2 parents eb91e6e + 4c187a1 commit 051ebfd
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Net.Mime;
using AutoMapper;
using ExtensionStoreAPI.Core.DataTypes.ApiV2;
using ExtensionStoreAPI.Core.DataTypes.Request;
Expand Down Expand Up @@ -74,6 +75,13 @@ public async Task<ActionResult<ApiV2ExtensionSummary>> GetExtensionSummaryByPack
public async Task<ActionResult<FileStream>> GetIconAsync(string packageId)
{
var iconFileStream = await _extensionManager.GetIconStreamAsync(packageId);
return File(iconFileStream, "image/jpg");
var contentDisposition = new ContentDisposition
{
FileName = "icon.png",
Inline = false
};
Response.Headers.Add("Content-Disposition", contentDisposition.ToString());

return File(iconFileStream, "image/png");
}
}

0 comments on commit 051ebfd

Please sign in to comment.