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

Thumbnailer can't deal with german special char filenames #2205

Closed
airbenich opened this issue Oct 7, 2018 · 3 comments
Closed

Thumbnailer can't deal with german special char filenames #2205

airbenich opened this issue Oct 7, 2018 · 3 comments

Comments

@airbenich
Copy link

Version Info

  • Directus version and branch (Or commit hash): 6.4.9
  • PHP version: 7.1.22
  • MySQL version: N/A
  • Web server: (Ex. Apache, nginx or IIS?) Apache
  • OS name and version: N/A

Expected Behavior

Using the thumbnail for image scaling should also scale images wich contains german special-chars in the filename.

Actual Behavior

Opening a file via thumbnailer with german special chars in the filename results in the default "Image not found" graphic.

Like:
https://domain.com/thumbnail/1000/1000/contain/best/this-is-a-special-char-file-äöüß.jpg

Steps to Reproduce

  1. Rename locally on your machine an image to: this-is-a-special-char-file-äöüß.jpg
  2. Upload the image via directus
  3. Call this image via thumbnailer:
    https://domain.com/thumbnail/1000/1000/contain/best/this-is-a-special-char-file-äöüß.jpg
@benhaynes
Copy link
Sponsor Member

Kamino cloned this issue to directus/api

@benhaynes
Copy link
Sponsor Member

Kamino closed and cloned this issue to directus/directus-6-legacy

@airbenich
Copy link
Author

Great! Thank you for fixing this issue in current version. For v6 the fix can be adapted like this:

In /thumbnail/index.php:

Change line 12 from:
$thumbnailer = new ThumbnailerService($app->files, $app->container->get('config')->get('thumbnailer'), $app->request->getPathInfo());

To:
$thumbnailer = new ThumbnailerService($app->files, $app->container->get('config')->get('thumbnailer'), urldecode($app->request->getPathInfo()));

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants