alfresco-community-repo
alfresco-community-repo copied to clipboard
Downloaded files have '+' (plus) character instead of ' ' (space)
Description
Filename is not preserved after downlaoding when it contains a whitespace character.
Steps to reproduce
- Upload "a b.c" file
- Download "a b.c" file
- Downloaded file name is "a+b.c"
Affected version
Alfresco Community 7.2
Faulty commit
I guess @kcichonczyk created this bug in the 870
Now it uses java.net.URLEncoder
, previosly it used org.springframework.extensions.surf.util.URLEncoder
where in the docs are implicily said that "The space character ' ' is converted into "%20" - NOT a plus sign!"
URLEncoder is mostly used to encode query parameters. Spring's UriUtils should do the job better to work around the (expected) behavior described in URLEncoder? However, to convert a space into a +
-Sign within a filename is not an expected behavior.
Good morning, The situation is the problem persists yet, and it is not solved apparently. The only way to download a file without name alteration is with "view in browser", this is curious that a so simple thing is not has been solved yet. Thank you
We've faced the same issue and had some issues because of that with a mimetype determination when we've been trying to download and upload a new version. Is there a version that fixes this behavior?