NIFI-13823: Using startsWith testing content viewer compatibility to better support content types that might have additional parameters. (#9337)

This closes #9337
This commit is contained in:
Matt Gilman 2024-10-03 13:44:55 -04:00 committed by GitHub
parent c624ccc5e5
commit af31d98139
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -253,7 +253,11 @@ export class ContentViewerComponent implements OnInit, OnDestroy {
if (Number.isInteger(supportedMimeTypeId)) {
const supportedContentViewer = this.supportedContentViewerLookup.get(supportedMimeTypeId);
if (supportedContentViewer) {
if (supportedContentViewer.supportedMimeTypes.mimeTypes.includes(mimeType)) {
const supportsMimeType = supportedContentViewer.supportedMimeTypes.mimeTypes.some(
(supportedMimeType) => mimeType.startsWith(supportedMimeType)
);
if (supportsMimeType) {
return supportedMimeTypeId;
}
}