refactor(core): Reduce memory usage in the Webhook node (#4640)

use file streaming to pass webhook binaries around
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2022-11-24 16:54:43 +01:00
committed by GitHub
parent 602b1e56d6
commit 07e4743a3e
16 changed files with 329 additions and 176 deletions

View File

@@ -20,10 +20,7 @@
</template>
<script lang="ts">
import {
IBinaryData,
IRunData,
} from 'n8n-workflow';
import type { IBinaryData, IRunData } from 'n8n-workflow';
import BinaryDataDisplayEmbed from '@/components/BinaryDataDisplayEmbed.vue';
@@ -44,7 +41,7 @@ export default mixins(
BinaryDataDisplayEmbed,
},
props: [
'displayData', // IBinaryDisplayData
'displayData', // IBinaryData
'windowVisible', // boolean
],
computed: {
@@ -67,14 +64,6 @@ export default mixins(
return binaryDataItem;
},
embedClass (): string[] {
// @ts-ignore
if (this.binaryData! !== null && this.binaryData!.mimeType! !== undefined && (this.binaryData!.mimeType! as string).startsWith('image')) {
return ['image'];
}
return ['other'];
},
workflowRunData (): IRunData | null {
const workflowExecution = this.workflowsStore.getWorkflowExecution;
if (workflowExecution === null) {