fix(projects): use fallback icon MIME (#1197)
Co-authored-by: Isaac Sanchez <isanchez-hawkins@arize.com>
This commit is contained in:
committed by
GitHub
co-authored by
Isaac Sanchez
parent
75d78b6113
commit
51356b4195
@@ -204,7 +204,9 @@ export const registerProjectIconRoutes = (app, dependencies) => {
|
||||
try {
|
||||
const data = await fsPromises.readFile(iconPath);
|
||||
const ext = path.extname(iconPath).slice(1).toLowerCase();
|
||||
const resolvedMime = metadataMime || projectIconExtensionToMime[ext] || 'application/octet-stream';
|
||||
const resolvedMime = iconPath === preferredPath && metadataMime
|
||||
? metadataMime
|
||||
: projectIconExtensionToMime[ext] || 'application/octet-stream';
|
||||
const contentType = resolvedMime === 'image/svg+xml' ? 'image/svg+xml; charset=utf-8' : resolvedMime;
|
||||
|
||||
if (resolvedMime === 'image/svg+xml' && requestedThemeVariant) {
|
||||
|
||||
Reference in New Issue
Block a user