Skip to content

Commit

Permalink
Typos and removing unneeded comments as noted by ahmetcetin39
Browse files Browse the repository at this point in the history
  • Loading branch information
Arpee Ong committed Jul 29, 2019
1 parent 4993496 commit aae497d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions source/image-handler/image-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion source/image-handler/thumbor-mapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit aae497d

Please sign in to comment.