Merge pull request #5006 from mdmontesinos/patch-1

FIX: File server MimeType not updated after image conversion
This commit is contained in:
Shaun Walker 2025-01-21 15:58:33 -05:00 committed by GitHub
commit 0e82e98382
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -253,12 +253,12 @@ namespace Oqtane.Pages
if (download)
{
_syncManager.AddSyncEvent(_alias, EntityNames.File, file.FileId, "Download");
return PhysicalFile(filepath, file.GetMimeType(), downloadName);
return PhysicalFile(filepath, MimeUtilities.GetMimeType(downloadName), downloadName);
}
else
{
HttpContext.Response.Headers.Append(HeaderNames.ETag, etag);
return PhysicalFile(filepath, file.GetMimeType());
return PhysicalFile(filepath, MimeUtilities.GetMimeType(downloadName));
}
}