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

å in filename #149

Closed
wolber6969 opened this issue Sep 14, 2019 · 3 comments
Closed

å in filename #149

wolber6969 opened this issue Sep 14, 2019 · 3 comments

Comments

@wolber6969
Copy link

Hi, we are now trying to move from version 3 to 4

we have som european character in our filename (key)

like
testbern [1]ått.jpeg

Space is ok
[ . is ok
but å make image handler not work

this is working for version 3 when we urlencode the key like testbern+%5B1%5D%C3%A5tt.jpeg

But this is not possible in version 4

Any idea how to use a key with foreign characther in name ?

B

@toredash
Copy link

toredash commented Nov 11, 2019

@wolber6969

We use base64 encoded request and have this issue as well.

Fix for us to replace this line https://github.com/awslabs/serverless-image-handler/blob/9ccdb7180c7881eb78c220f3958b671d968c16dd/source/image-handler/image-request.js#L197
From
return JSON.parse(toBuffer.toString('ascii'));
To:
return JSON.parse(toBuffer);

It will then use utf-8 encoding

Example:

toBuffer.toString()
'{"bucket":"X","key":"ø.jpg","edits":{"grayscale":true}}'
toBuffer.toString('ascii')
'{"bucket":"sX","key":"C8.jpg","edits":{"grayscale":true}}'

@ericquinones
Copy link

Hi there,
Thanks for the input. This has been added to our list of items to evaluate for future releases. Please monitor the repository for updates.

@beomseoklee
Copy link
Member

We have updated our solution, and I believe your issue has been fixed. If you still see the issue with the latest version (v4.2), please feel free to reopen the issue.

You can refer to the recent changes here

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

5 participants