Unable to view a file name that contains '%20' on my azure web app

Michael M 1 Reputation point
2021-10-28T22:38:56.307+00:00

I have set up an app service through Azure with Azure Repos(TfsGit) as the source.
Here's how the files set up on my repo:

files/img1.png
files/%20.png

and once deployed, I should be able to see those files under my web app. for example:

https://mine.azurewebsites.net/files/img1.png ---> looks fine

however these urls below give me the error 'The resource you are looking for has been removed, had its name changed, or is temporarily unavailable'

https://mine.azurewebsites.net/files/%20.png ---> can't load the file

I also tried these but no luck

https://mine.azurewebsites.net/files/%2520.png ---> can't load the file
https://mine.azurewebsites.net/files/%252520.png ---> can't load the file

How I can view that particular file?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,829 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Francisco José Moreno Caravaca 96 Reputation points
    2021-11-01T10:21:37.007+00:00

    Hi, Michael

    "%" (ASCII 25 hex): Used for encoding "strange" characters.
    * What characters should we use? Basically everything is based on US-ASCII. The% symbol will remain as the encoding system. This implies that the unsafe characters will be painted as% followed by 2 numbers. These numbers will refer to hexadecimal. For example,% 20 refers to ASCII character 20, which is "space". The rest of the special characters are defined in the list: "!", "$", "&", "‘ "," (",") "," * "," + ",", ","; " and "=". The unreserved characters are: "letters", "numbers", "-", ".", "_" And "~". In the latter cases, when one of them is encoded in the URL, it must be converted to its original value. This means that if we find an address like this:

    //example.com/example%2Dde%2Durl%2Ehtml
    the browser (or any system) must leave it standardized in:

    //example.com/url-example.html
    In this way, these are semi-reserved characters since they have a special treatment.

    • Tim Berners-Lee document from June 1994 (3986)

    I recommend that you do not use any special characters to create the name of the image.

    0 comments No comments