-
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
Cannot render images without file extensions #188
Comments
Hi @ianjamieson , and thanks for contacting us. |
Hey @beomseoklee - yeh it looks similar, I have subscribed to the other thread. |
I made this for me from latest version. It handles files without extensions. |
@Karlen92 - that's great thank you. Are there significant changes? How about making a PR on this repo or forking this repo? |
@ianjamieson changes are a few lines, but I believe in the latest version now it's fixed |
Thanks @Karlen92 |
Ran into this bug as of release 5.1, still not fixed. |
We've added limited support for files without extensions in v5.2.0. Any image filters that use Amazon Rekognition (content moderation and smart cropping) will not work with files that do not have an extension. |
I am using version 4.2 with no modifications.
Given an image in S3:
https://bucket.s3-region.amazonaws.com/imageWithNoExtension
I cannot access this image in via cloudfront: https://uniqueId.cloudfront.net/imageWithNoExtension
I get the error:
Also, I cannot use the Thumbor style syntax to resize this image: https://uniqueId.cloudfront.net/fit-in/100x100/imageWithNoExtension
I get this error:
When you
parseRequestType
,matchDefault.test(path)
istrue
:https://github.com/awslabs/serverless-image-handler/blob/19cbc3ce759d7c8d8ddc35081972d7ac1daf0c71/source/image-handler/image-request.js#L207-L233
And subsequently when attempting to
decodeRequest
:https://github.com/awslabs/serverless-image-handler/blob/19cbc3ce759d7c8d8ddc35081972d7ac1daf0c71/source/image-handler/image-request.js#L242-L255
That
try
block fails and throws the error.What I am hoping to achieve is that if my file exists (without a file extension) in S3 then we can still serve that image via cloudfront.
The text was updated successfully, but these errors were encountered: