Image Name Has %20 in File Name

I have update the latest version of - 2.4.0.beta 7 and after that when i upload the images. It is showing file name is (Nature%20Photo) instead of (Nature Photo).

[Nature%20Photo|690x334](upload://shafkjshdfjklh41safskfj.png)

Can anyone help me, how to resolve the issue?

I am using “Restrict Uploads” plugin. I think this may be create conflict but I have disable this and upload image but getting same issue.

Looking help!

5 Likes

Sounds like it might be a bug.

If you’re interested in protecting uploads you might be interested in Disallow anonymous users from viewing image & file URLs.

5 Likes

Confirmed with no plugins, I can repro this, @Martin_Brennan can you have a look?

Drag a drop a file with the name test test.png and we insert this char.

7 Likes

Fixed via FIX: Replace %20 with space in markdown file name for uploads by martin-brennan · Pull Request #8405 · discourse/discourse · GitHub. This was happening because we were converting the filename to a URL-encoded string to avoid other bugs. We still do the same, but now we leave the spaces as is instead of replacing with %20.

12 Likes

after discourse latest update problem is resolved.

But there are still previous upload images showing %20 in file name.

What I have to do for previous images? as I have to do re-upload or any other solution.

1 Like

You are going to need to edit by hand here unfortunately. That is the simplest course here.

5 Likes

This topic was automatically closed after 24 hours. New replies are no longer allowed.