Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Does anyone know why Umbraco removes e.g. parentheses from filenames when they are uploaded to media?
As far as I know they are not illegal and I cannot find any config settings to change this behavior. Can I change it?
I have a customer for which the parentheses are very important in the file names.
I haven't looked into this myself but a few thoughts and things you might try are below.
I assume you mean that the url to a file loses the parentheses? Which, I suppose, means the filename itself was altered upon upload since the umbracoFile property is the filename and needs to be sanitized to be url-safe.
For content nodes, there are url-replacements for "special" characters. These used to all listed in the /config/umbracosettings.config file. But since few people ever changed them they were moved out of the file with a comment left behind.
Might be this is also used for media filenames on upload? That's what I'm not sure about. It would be worth a quick try though.
Details on urlReplacing at https://our.umbraco.org/documentation/reference/config/umbracosettings/ and in the comments of the /config/umbracosettings.config file.
Though currently the ( and ) characters aren't included by default now they once were (they were removed from urls back then) so if you have an older or upgraded site maybe you're finding that lingering behaviour?
As a quick test, try using this to force keeping them:
Good idea, but it did not work.
No change at all. The file name is still missing (). It is an Umbraco 6.1 site, but I can see that 6.2 and 7.2 does the same thing.
Thanks for trying!
Guess it'll take a look into the source code to see why this is happening then, and if there is a way to change the behaviour short of a change in the code.
Cheers Doug. Hope you find something good :)
Actually, I was kinda bailing out and was sort of hoping you'd dig in and let us know what you found in the code. :)
Or maybe someone else knows the answer off the top of their head?
Aaah, of course. I misread (Will mark your "answer" as spam now ;P)
Its not a link validity thing like the fact urls are not supposed to have ( ) in them??
@Ravi - There's no problem with parentheses in urls, they are included in the 'safe' list.
fair enough, we were having a similar conversation around link validity, but if the issue is with parenthesis as I have now reread ( I bizarrely read it square brackets or curly braces not parentheses).. then I'm not sure
any way carry on
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted