diff --git a/packages/editor-ui/src/components/RunData.vue b/packages/editor-ui/src/components/RunData.vue index 8ce435b6d6..8df52c69b0 100644 --- a/packages/editor-ui/src/components/RunData.vue +++ b/packages/editor-ui/src/components/RunData.vue @@ -157,6 +157,10 @@
File Name:
{{binaryData.fileName}}
+
+
Directory:
+
{{binaryData.dir}}
+
File Extension:
{{binaryData.fileExtension}}
diff --git a/packages/nodes-base/nodes/ReadBinaryFiles.node.ts b/packages/nodes-base/nodes/ReadBinaryFiles.node.ts index 4e8d9f2ac3..7a42764f35 100644 --- a/packages/nodes-base/nodes/ReadBinaryFiles.node.ts +++ b/packages/nodes-base/nodes/ReadBinaryFiles.node.ts @@ -60,14 +60,12 @@ export class ReadBinaryFiles implements INodeType { const items: INodeExecutionData[] = []; let item: INodeExecutionData; let data: Buffer; - let fileName: string; for (const filePath of files) { data = await fsReadFileAsync(filePath) as Buffer; - fileName = path.parse(filePath).base; item = { binary: { - [dataPropertyName]: await this.helpers.prepareBinaryData(data, fileName), + [dataPropertyName]: await this.helpers.prepareBinaryData(data, filePath), }, json: {}, }; diff --git a/packages/workflow/src/Interfaces.ts b/packages/workflow/src/Interfaces.ts index fc1498651f..22b762fe82 100644 --- a/packages/workflow/src/Interfaces.ts +++ b/packages/workflow/src/Interfaces.ts @@ -9,6 +9,7 @@ export interface IBinaryData { data: string; mimeType: string; fileName?: string; + dir?: string; fileExtension?: string; }