FIX: File server MimeType not updated after image conversion

This commit is contained in:
David Montesinos 2025-01-20 12:17:22 +01:00 committed by GitHub
parent d1f78f9048
commit ca7fdaa125
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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