mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ Make WriteBinaryFile-Node error when data is missing
This commit is contained in:
@@ -60,11 +60,11 @@ export class WriteBinaryFile implements INodeType {
|
||||
const fileName = this.getNodeParameter('fileName') as string;
|
||||
|
||||
if (item.binary === undefined) {
|
||||
return item;
|
||||
throw new Error('No binary data set. So file can not be written!');
|
||||
}
|
||||
|
||||
if (item.binary[dataPropertyName] === undefined) {
|
||||
return item;
|
||||
throw new Error(`The binary property "${dataPropertyName}" does not exist. So no file can be written!`);
|
||||
}
|
||||
|
||||
// Write the file to disk
|
||||
|
||||
Reference in New Issue
Block a user