When uploaded files contain spaces, like “My file.pdf” they are uploaded correctly but then when they are downloaded via cam-file-download directive or a direct call to the res aPI the file is just saved as “My”.
Analyzing the issue I noticed the content-disposition header is malformed, it is set as
“Content-Disposition: attachment; filename=My file.pdf”.
But spaces in filename should be URL encoded, so it shuold be:
“Content-Disposition: attachment; filename=My%20file.pdf”.
Thanks for the advise Miklas I have created issue CAM-11925. I would be happy to contribute with a fix so I have also forked the project already, I will create a pull request when done.