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

fix: Enable to open a file containing an '+' character in its title in the chat application - EXO-64326 #608

Merged
merged 7 commits into from
May 25, 2023

Conversation

sofyenne
Copy link
Member

@sofyenne sofyenne commented May 16, 2023

Before to this change , after uploading a file with name containing a '+' character in chat application ,we were unable to open it , the problem that was the '+' character on the file's path being replaced by a space .
After encoding the node name , This change is going to clean the file name using the utils clean name method.

@@ -188,6 +189,8 @@ public Response persistFile(@Context SecurityContext securityContext,
String workspace = node.getSession().getWorkspace().getName();
String repository = ((ManageableRepository) node.getSession().getRepository()).getConfiguration().getName();
String nodePathWithWorkspace = workspace + node.getPath();
String fileNameFromPath = node.getPath().substring(node.getPath().lastIndexOf("/") + 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we use node.getName() or if the node title exists, node.getProperty("exo:title").getString() ?

Copy link
Member Author

@sofyenne sofyenne May 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR updated !

@sofyenne sofyenne force-pushed the Task/64326 branch 3 times, most recently from 86274c6 to e402e51 Compare May 16, 2023 18:26
@exo-swf exo-swf marked this pull request as draft May 17, 2023 09:41
@exo-swf
Copy link
Contributor

exo-swf commented May 17, 2023

Your PR triggers too many exo-ci builds! Please finish your work and then, set your PR ready! Thank you

@sofyenne sofyenne marked this pull request as ready for review May 17, 2023 18:49
@sofyenne sofyenne requested a review from ahamdi May 17, 2023 20:12
ahamdi
ahamdi previously approved these changes May 23, 2023
@sonarcloud
Copy link

sonarcloud bot commented May 25, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@sofyenne sofyenne merged commit 4edae89 into feature/maintenance May 25, 2023
6 checks passed
@sofyenne sofyenne deleted the Task/64326 branch May 25, 2023 09:13
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

Successfully merging this pull request may close these issues.

None yet

4 participants