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

Update FileAdder.php #3031

Closed
wants to merge 1 commit into from
Closed

Update FileAdder.php #3031

wants to merge 1 commit into from

Conversation

tommica
Copy link
Contributor

@tommica tommica commented Sep 14, 2022

Update the default filename sanitizer to handle funky whitespace characters in files - I had a case where a file was being uploaded, and it kepts throwing Flysystems CorruptedPathDetected exception. Not sure if copy-pasting the filename to github keeps the characters there: Scan-‎9‎.‎14‎.‎2022-‎7‎.‎23‎.‎28.pdf

Screenshot 2022-09-14 at 08 57 37

Update the default filename sanitizer to handle funky whitespace characters in files - I had a case where a file was being uploaded, and it kepts throwing Flysystems `CorruptedPathDetected` exception. Not sure if copy-pasting the filename to github keeps the characters there: `Scan-‎9‎.‎14‎.‎2022-‎7‎.‎23‎.‎28.pdf`
@freekmurze
Copy link
Member

Could you add a test for this?

@patinthehat
Copy link
Collaborator

Hey @tommica, I'm just following up on the request by @freekmurze - are you able to add some unit tests for this PR? Thanks!

@tommica
Copy link
Contributor Author

tommica commented Nov 21, 2022 via email

@patinthehat
Copy link
Collaborator

@tommica No problem, I've taken care of it 👍. I have created a new PR, #3104, that supersedes this PR and includes the necessary unit tests; you've been given credit for your contribution there. Please refer to that PR for updates. Thank you!

patinthehat added a commit that referenced this pull request Nov 22, 2022
freekmurze pushed a commit that referenced this pull request Nov 22, 2022
* Update FileAdder.php

Update the default filename sanitizer to handle funky whitespace characters in files - I had a case where a file was being uploaded, and it kepts throwing Flysystems `CorruptedPathDetected` exception. Not sure if copy-pasting the filename to github keeps the characters there: `Scan-‎9‎.‎14‎.‎2022-‎7‎.‎23‎.‎28.pdf`

* add unit tests for PR #3031

* Fix styling

Co-authored-by: Tommi Carleman <[email protected]>
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.

3 participants