mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
⚡ Removed deprecation warning
This commit is contained in:
parent
ccb445a714
commit
32175a19ca
|
@ -328,7 +328,7 @@ export class Webhook implements INodeType {
|
|||
const fileJson = files[file].toJSON() as IDataObject;
|
||||
const [fileName, fileExtension] = (fileJson.name as string).split('.');
|
||||
const fileContent = await fs.promises.readFile(files[file].path);
|
||||
const buffer = new Buffer(fileContent);
|
||||
const buffer = Buffer.from(fileContent);
|
||||
set(returnData[0], `binary[${fileName}]`, {
|
||||
data: buffer.toString('base64'),
|
||||
mimeType: fileJson.type,
|
||||
|
|
Loading…
Reference in a new issue