From 5a72bad72a14556a76028b8c24a502b1466e2d2b Mon Sep 17 00:00:00 2001 From: Mark Hindess Date: Wed, 15 Oct 2014 10:46:30 +0100 Subject: [PATCH 1/4] Fix missing credentials error case. --- aws/s3.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aws/s3.js b/aws/s3.js index 1a078bb3..0d764314 100644 --- a/aws/s3.js +++ b/aws/s3.js @@ -26,7 +26,11 @@ module.exports = function(RED) { this.filename = n.filename || ""; this.localFilename = n.localFilename || ""; var node = this; - var AWS = this.awsConfig.AWS; + var AWS = this.awsConfig ? this.awsConfig.AWS : null; + if (!AWS) { + node.warn("Missing AWS credentials"); + return; + } if (AWS) { var s3 = new AWS.S3(); node.status({fill:"blue",shape:"dot",text:"checking credentials"}); From fd5011ec7390e56976090eb33af4134c0f358925 Mon Sep 17 00:00:00 2001 From: Mark Hindess Date: Thu, 9 Oct 2014 20:08:22 +0100 Subject: [PATCH 2/4] Add amazon icon. --- aws/icons/amazon.png | Bin 0 -> 506 bytes aws/s3.html | 1 + 2 files changed, 1 insertion(+) create mode 100644 aws/icons/amazon.png diff --git a/aws/icons/amazon.png b/aws/icons/amazon.png new file mode 100644 index 0000000000000000000000000000000000000000..c4d5405f26428022dc018356bfef0b487c17c2e6 GIT binary patch literal 506 zcmVPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^(^ z69WmK$#$9m00DYQL_t(Y$L*CpYgADXhUaY7RfDDoZ2V|!5(t>WDuRWDm7Un7NFmlL z1T7WzKiJvY1dB8wMG`F}AOr#;Vx>Pogg`3AVxPxmE;;C~aTCjZt8->J&&<5{+;x+ewQ0p6PeRKEgG)Yho58ziBE)p|TC@O1+M?q=*^RbXA67zKDc0V_=m zIIsRp;1XF*4=SnGO{(0oz?%fA<&p*}s+n60- zu>w9&`}JvH73k%5M_p8(t8dj;>bbh3qJ9LnftifWsmtn;I?ioM`X*nst@QJI=2n4g+2zHf wu1*`cuYRg*?C1WeI(^blS$q6v80%2K0P->#;j;>5@Bjb+07*qoM6N<$f~`W>2mk;8 literal 0 HcmV?d00001 diff --git a/aws/s3.html b/aws/s3.html index 5d4f1acd..06dd52b6 100644 --- a/aws/s3.html +++ b/aws/s3.html @@ -53,6 +53,7 @@ }, inputs:1, outputs:0, + icon: "amazon.png", align: "right", label: function() { return this.bucket ? "s3 "+this.bucket : "s3"; From 08388ac0871b97b7411da6904948de9cf5cde40c Mon Sep 17 00:00:00 2001 From: Mark Hindess Date: Mon, 13 Oct 2014 09:10:36 +0100 Subject: [PATCH 3/4] Add Amazon S3 query node. --- aws/s3.html | 44 +++++++++++++++++++++++++++++++++++++++++++ aws/s3.js | 54 +++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 94 insertions(+), 4 deletions(-) diff --git a/aws/s3.html b/aws/s3.html index 06dd52b6..60750e3d 100644 --- a/aws/s3.html +++ b/aws/s3.html @@ -14,6 +14,49 @@ limitations under the License. --> + + + + + + + + + + +