mirror of https://github.com/apache/nifi.git
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:
parent
c624ccc5e5
commit
af31d98139
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue