added output port for storage-write that gives status
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
cred: {value: "", type: 'firebase-config'}
|
||||
},
|
||||
inputs:1,
|
||||
outputs:0,
|
||||
outputs:1,
|
||||
icon: "storage.png",
|
||||
label: function() {
|
||||
return this.name||"storage-write";
|
||||
|
||||
@ -33,8 +33,10 @@ module.exports = function(RED) {
|
||||
file.save(contents, options, function(err) {
|
||||
if (!err) {
|
||||
// File written successfully.
|
||||
node.send({payload:{success:true, filename: path}})
|
||||
} else {
|
||||
console.log('cloud storage write error: '+err)
|
||||
node.send({payload:{success:false, filename: path}})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user