Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
howkymike opened this issue May 29, 2022 · 3 comments
Open

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

howkymike opened this issue May 29, 2022 · 3 comments

Comments

@howkymike
Copy link

howkymike commented May 29, 2022

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!"

@hi-ko
Copy link

hi-ko commented May 30, 2022

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.

@antoniorv75
Copy link

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

@ArtyomPanfutov
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants