RWS / dxa-web-application-dotnet

SDL Digital Experience Accelerator .NET MVC web application
Apache License 2.0
19 stars 35 forks source link

Images with spaces return 404 #82

Open ngibbonssdl opened 3 years ago

ngibbonssdl commented 3 years ago

Hi,

I've noticed in the latest 2.2.6 version that images with spaces return not found. The problem appears to be with the 702fb31e878e4ad6aa27d2e7feba1f86e476cb27 commit.

This commit means that the urlPath is now encoded before being supplied to the ApiClient, causing images paths like "/media/Loan%20protection%20-%20Desktop_tcm19-184437.png" to become "/media/Loan%2520protection%2520-%2520Desktop_tcm19-184437.png" - note the % is now encoded as %25.

This mean null is returned because the path in the database is "/media/Loan%20protection%20-%20Desktop_tcm19-184437.png".