From aae497dc0f3a594f8101aeac57cdce9a75004adf Mon Sep 17 00:00:00 2001 From: Arpee Ong Date: Mon, 29 Jul 2019 23:46:59 +0800 Subject: [PATCH] Typos and removing unneeded comments as noted by ahmetcetin39 --- source/image-handler/image-request.js | 5 ----- source/image-handler/thumbor-mapping.js | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/source/image-handler/image-request.js b/source/image-handler/image-request.js index aab0d9a72..2b8699078 100644 --- a/source/image-handler/image-request.js +++ b/source/image-handler/image-request.js @@ -136,11 +136,6 @@ class ImageRequest { const decoded = this.decodeRequest(event); return decoded.key; } else if (requestType === "Thumbor" || requestType === "Custom") { - // Parse the key from the end of the path - //const key = (event["path"]).split("/"); - //return key[key.length - 1]; - - //Arpee: Support serving images under s3 subdirectories return decodeURIComponent(event["path"].replace(/\d+x\d+\/|filters[:-][^/;]+|\/fit-in\/+|^\/+/g,'').replace(/^\/+/,'')); } else { // Return an error for all other conditions diff --git a/source/image-handler/thumbor-mapping.js b/source/image-handler/thumbor-mapping.js index e0d3c7364..e4cae3ddf 100644 --- a/source/image-handler/thumbor-mapping.js +++ b/source/image-handler/thumbor-mapping.js @@ -30,7 +30,7 @@ class ThumborMapping { const edits = this.path.split('/'); const filetype = (this.path.split('.'))[(this.path.split('.')).length - 1]; - //Process the Dimenions + //Process the Dimensions const dimPath = this.path.match(/[^\/]\d+x\d+/g); if (dimPath) { const dims = dimPath[0].split('x');