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 by loading image in assets folder with whitespace #2971
Comments
Had a very similar issue with video file names that contain spaces in frontend and backend. Maybe this is connected |
@ZhaoVitapublic as I don't have a local dev environment running on nginx, it would be great if you could provide a tested PR - thanks! |
@brusch
I hope, this example can help you to reproduce the problem. Unlike the handling for documents, assets handing allow us to create folder and upload files with all special character like #,?,&. I think, the better way is, that by the upload progress, simply replace such character using some service like
In additional, the following environment is currently used for my local pimcore: system: centos
php core:
php-fpm:
Pimcore:
|
Maybe this helps I'm using this docker-compose setup https://dockerwest.github.io/compose-pimcore/ which also uses nginx locally and as I said above has the same issue. It's fairly easy to set up so maybe this is worth giving a shot for debugging this issue. |
@ZhaoVitapublic as I said, I don't have a nginx development/testing environment, so a PR would be really helpful. Thanks |
@brusch Otherwise, as i mentions, this problem is also appears by the https://demo-basic.pimcore.org, I assume, that problem can also be relevant for apache and other http server. |
Not so easy to solve it seems: Let's see if someone has an idea ... |
@brusch
|
|
Putting the files url-encoded onto the filesystem is also no option, since Apache unescapes certain characters automatically and so the file exist condition won't work. |
Generally, the string after the router hash is not available from the server site and the string after the question mark should be used for the request parameter. |
Well correctly escaped it's not a problem ... |
But yes, i guess it makes sense to disallow them. |
Disallowed characters: |
Fixed at least the issues with the characters |
If there isn't any way to solve that using the Nginx config, we have to probably think about passing them through PHP or disallowing certain characters for asset filenames when using Nginx. |
@brusch |
Yep, the event |
Problem
Reason: nginx would not encode the whitespace character from "%20" into " ", the file path will be contains wrong character.
Steps to reproduce
Expected behavior
Can load asset file by full path and can load image without fallback with PublicServiceController
Actual behavior
Can not load asset file in the folder "Data Object". The thumbnails can only load with PublicServiceController
Code example
The text was updated successfully, but these errors were encountered: