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');