Skip to content

Instantly share code, notes, and snippets.

@richardgrantserverless
Created May 20, 2022 01:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richardgrantserverless/1e631504b3c8b9de40c7b3ddbf5c88ee to your computer and use it in GitHub Desktop.
Save richardgrantserverless/1e631504b3c8b9de40c7b3ddbf5c88ee to your computer and use it in GitHub Desktop.
async resize(size, path) {
try {
const sizeArray = size.split('x')
const width = parseInt(sizeArray[0])
const height = parseInt(sizeArray[1])
const Key = path
const newKey = '' + width + 'x' + height + '/' + path
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment