From ac91bd83ec8550018bfbfab33e2152af6825a006 Mon Sep 17 00:00:00 2001 From: "swapnil.verma" Date: Thu, 19 Dec 2024 11:23:56 +0530 Subject: [PATCH] [ACS-8818] Mime type icons are now updated with file names in the viewer --- .../src/lib/viewer/components/alfresco-viewer.component.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts index 99a56d33af..162e555cc4 100644 --- a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts +++ b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts @@ -334,6 +334,7 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit { const fileExtension = this.viewUtilService.getFileExtension(versionData ? versionData.name : nodeData.name); this.fileName = versionData ? versionData.name : nodeData.name; + this.mimeType = mimeType; const viewerType = this.viewUtilService.getViewerType(fileExtension, mimeType); if (viewerType === 'unknown') { @@ -348,13 +349,11 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit { const nodeMimeType = nodeData?.content?.mimeType; const renditionMimeType = nodeRendition.mimeType; - mimeType = renditionMimeType || nodeMimeType; + this.mimeType = renditionMimeType || nodeMimeType; } } else if (viewerType === 'media') { this.tracks = await this.renditionService.generateMediaTracksRendition(this.nodeId); } - - this.mimeType = mimeType; this.urlFileContent = urlFileContent + (this.cacheBusterNumber ? '&' + this.cacheBusterNumber : ''); this.sidebarRightTemplateContext.node = nodeData; this.sidebarLeftTemplateContext.node = nodeData;