- Docs for various nodes updated (closes #9)

- Fixed some nodes not matching how their docs describe how they function (such as node configuration should always take precedence over inputs)
This commit is contained in:
2021-09-02 10:51:47 -06:00
parent b698389491
commit 4bd2dce434
24 changed files with 184 additions and 184 deletions
+3 -8
View File
@@ -61,17 +61,12 @@ module.exports = function(RED) {
return;
}
msg.contentType = msg.contentType || node.contentType;
if(!msg.contentType) {
node.error('msg.contentType is required');
return;
}
msg.contentType = node.contentType || msg.contentType || null;
node.log("Uploading image " + msg.filename);
node.server.matrixClient.uploadContent(
msg.payload, {
name: msg.filename || null, // Name to give the file on the server.
rawResponse: (msg.rawResponse || false), // Return the raw body, rather than parsing the JSON.
rawResponse: false, // Return the raw body, rather than parsing the JSON.
type: msg.contentType, // Content-type for the upload. Defaults to file.type, or applicaton/octet-stream.
onlyContentUri: false // Just return the content URI, rather than the whole body. Defaults to false. Ignored if opts.rawResponse is true.
})
@@ -91,7 +86,7 @@ module.exports = function(RED) {
})
.catch(function(e){
node.warn("Error uploading image message " + e);
msg.matrixError = e;
msg.error = e;
node.send([null, msg]);
});
});