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

Problem with :filename #146

Open
whipsterCZ opened this issue Oct 16, 2015 · 4 comments
Open

Problem with :filename #146

whipsterCZ opened this issue Oct 16, 2015 · 4 comments

Comments

@whipsterCZ
Copy link

Hello

I come across to problem when I'm using special (diacritics and white space) characters in filename.

$path = $model->file->url(); //return correctly  "my/path/Snímek obrazovky 2015-10-16 v 12.57.26.png"

but if its in <img src={{$path}}> server throws 404 Not Found Exception

because its trying to fetch Sn%C3%ADmek%20obrazovky%202015-10-16%20v%2013.00.24.png

I thing it will be great feature if configuration has option :safeFilename which converts original filename to ASCII

@kyranb
Copy link

kyranb commented Jan 2, 2016

👍 Just ran into this issue in production

@benallfree
Copy link
Contributor

Fixed in #150

@hackel
Copy link

hackel commented Mar 8, 2017

Well, I finally got hit by this bug a year later. It also affects any filename with a % in it, which it turns out certain disreputable browsers use to save images, e.g. "my%20face.jpg". It seems like a rather critical issue.

@benallfree Do you still intend to refactor #150 or would you like me to do it? I actually already did it for my own project, but I had to make my own url() method that manually creates an instance of a URLEncodingInterpolator and sets it on the Attachment instance. It would be great if this was built-in.

@benallfree
Copy link
Contributor

I believe #167 fixes this whole issue because filesystem names are no longer based on the URL name.

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

4 participants