mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(editor): Make PDF and Audio binary-data viewable in the UI (#7367)
fixes #7361
This commit is contained in:
committed by
GitHub
parent
732b15a1fa
commit
8187be1b7d
@@ -113,8 +113,10 @@ export const sleep = async (ms: number): Promise<void> =>
|
||||
export function fileTypeFromMimeType(mimeType: string): BinaryFileType | undefined {
|
||||
if (mimeType.startsWith('application/json')) return 'json';
|
||||
if (mimeType.startsWith('image/')) return 'image';
|
||||
if (mimeType.startsWith('audio/')) return 'audio';
|
||||
if (mimeType.startsWith('video/')) return 'video';
|
||||
if (mimeType.startsWith('text/')) return 'text';
|
||||
if (mimeType.startsWith('text/') || mimeType.startsWith('application/javascript')) return 'text';
|
||||
if (mimeType.startsWith('application/pdf')) return 'pdf';
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user