mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Remove temporary uploaded files from webhook calls (#18128)
Co-authored-by: Danny Martini <danny@n8n.io>
This commit is contained in:
committed by
GitHub
parent
11dcef36df
commit
c610c3af3e
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable n8n-nodes-base/node-execute-block-wrong-error-thrown */
|
||||
import { createWriteStream } from 'fs';
|
||||
import { stat } from 'fs/promises';
|
||||
import { rm, stat } from 'fs/promises';
|
||||
import isbot from 'isbot';
|
||||
import type {
|
||||
IWebhookFunctions,
|
||||
@@ -363,6 +363,9 @@ export class Webhook extends Node {
|
||||
file.mimetype,
|
||||
);
|
||||
|
||||
// Delete original file to prevent tmp directory from growing too large
|
||||
await rm(file.filepath, { force: true });
|
||||
|
||||
count += 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user