Skip to content

Problem with :filename #146

Open
Open

Description

@whipsterCZ

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

Activity

  1. kyranb commented on Jan 2, 2016

    @kyranb

    👍 Just ran into this issue in production

  2. benallfree commented on Jan 8, 2016

    @benallfree
    Contributor

    Fixed in #150

  3. hackel commented on Mar 8, 2017

    @hackel

    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.

  4. benallfree commented on Mar 8, 2017

    @benallfree
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions