Skip to content

Commit

Permalink
[ACS-8818] Mime type icons are now updated with file names in the viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
swapnil-verma-gl committed Dec 19, 2024
1 parent 76d4c6a commit ac91bd8
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -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;
Expand Down

0 comments on commit ac91bd8

Please sign in to comment.