mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(Move Binary Data Node): Stringify objects before encoding them in MoveBinaryData (#4882)
* stringify objects before encoding them objects in MoveBinaryData * add fileSize and fileType on MoveBinaryData converted data * show `view` option for text files as well * improve how JSON binary data is shown in the UI
This commit is contained in:
committed by
GitHub
parent
f4481e24e8
commit
3b969d2cd1
@@ -64,7 +64,7 @@ import {
|
||||
NodeExecutionWithMetadata,
|
||||
IPairedItemData,
|
||||
deepCopy,
|
||||
BinaryFileType,
|
||||
fileTypeFromMimeType,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { Agent } from 'https';
|
||||
@@ -836,13 +836,6 @@ export async function getBinaryDataBuffer(
|
||||
return BinaryDataManager.getInstance().retrieveBinaryData(binaryData);
|
||||
}
|
||||
|
||||
function fileTypeFromMimeType(mimeType: string): BinaryFileType | undefined {
|
||||
if (mimeType.startsWith('image/')) return 'image';
|
||||
if (mimeType.startsWith('video/')) return 'video';
|
||||
if (mimeType.startsWith('text/') || mimeType.startsWith('application/json')) return 'text';
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Store an incoming IBinaryData & related buffer using the configured binary data manager.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user