Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect comment in Listing 3.1 #5

Open
berkerpeksag opened this issue Jul 12, 2017 · 0 comments
Open

Incorrect comment in Listing 3.1 #5

berkerpeksag opened this issue Jul 12, 2017 · 0 comments

Comments

@berkerpeksag
Copy link

The following snippet is in serverless-architectures-aws/chapter-3/Listing 3.1 - 3.4 - Transcode Video Lambda/index.js:

//the input file may have spaces so replace them with '+'
var sourceKey = decodeURIComponent(key.replace(/\+/g, ' '));

However, the code does the opposite of what the comment says. I think the correct version should read as:

var sourceKey = decodeURIComponent(key.replace(/\W/g, '+'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant