-
Notifications
You must be signed in to change notification settings - Fork 538
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
Unable to parse S3 Key with prefix under Thumbor mode #231
Comments
@salander0411 Thanks for contacting us, and thanks for your feedback. We'll investigate this issue and get back to you. |
Thanks @beomseoklee , any update? |
@salander0411 I think this would work. Not fully tested though.
So maybe the source code you provided can be replaced to if (requestType === "Thumbor" || requestType === "Custom") {
return decodeURIComponent(event["path"].replace(/\d+x\d+\/|filters:.+(.?\))|\/fit-in\/+|^\/+/g,'').replace(/^\/+/,''));
} I'm still testing it. |
The key could be parsed correctly but the overlay image key cannot be parsed now. https://xxxxx.cloudfront.net/fit-in/400x400/filters:watermark(test,random.jpg,0,0)/lena.jpg orginal image could be parsed to be: https://xxxxx.cloudfront.net/lena.jpg but the overlay image key now parsed to be : filters:watermark(oss-to-s3-test, |
Looking forward for your update, thanks! |
Thanks for waiting @salander0411 |
example:
URL that could be parsed correctly: https://xxxxx.cloudfront.net/fit-in/400x400/filters:watermark(test,random.jpg,0,0)/lena.jpg
URL that couldn't be parsed: https://xxxxx.cloudfront.net/fit-in/400x400/filters:watermark(test,test/random.jpg,0,0)/lena.jpg be
That looks like is due to
the regex will lead the key to be 'random.jpg,0,0)/lena.jpg '
in parseImageKey in image-request.js
The text was updated successfully, but these errors were encountered: