Open luizgaroland opened 4 years ago
Currently im having a problem with the UrlBuilder.
UrlBuilder->getUrl uses parse_url and it return the wrong path for my files if they have a special character on the name.
For example Se#ection_188.png becomes '/path/Se' and it causes a failure.
To fix this i did something like this just before the parse_url:
$pathinfo = pathinfo($path); $encodedFileName = urlencode($pathinfo['basename']); $pathinfo['dirname'] = implode('/', array_map(function ($element) { return urlencode($element); }, explode('/', $pathinfo['dirname']))); $path = $pathinfo['dirname'] . '/' . $encodedFileName;
And then decoded the path inside the request controller.
Is there a way to achieve this without having to edit the the UrlBuilder directly?
Currently im having a problem with the UrlBuilder.
UrlBuilder->getUrl uses parse_url and it return the wrong path for my files if they have a special character on the name.
For example Se#ection_188.png becomes '/path/Se' and it causes a failure.
To fix this i did something like this just before the parse_url:
And then decoded the path inside the request controller.
Is there a way to achieve this without having to edit the the UrlBuilder directly?