alfresco-community-repo icon indicating copy to clipboard operation
alfresco-community-repo copied to clipboard

Downloaded files have '+' (plus) character instead of ' ' (space)

Open howkymike opened this issue 2 years ago • 3 comments

Description

Filename is not preserved after downlaoding when it contains a whitespace character.

Steps to reproduce

  1. Upload "a b.c" file
  2. Download "a b.c" file
  3. 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!"

howkymike avatar May 29 '22 15:05 howkymike

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.

hi-ko avatar May 30 '22 14:05 hi-ko

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

antoniorv75 avatar Jul 15 '22 06:07 antoniorv75

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?

ArtyomPanfutov avatar Oct 05 '22 13:10 ArtyomPanfutov