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

Support whitespaces in filename #240

Closed
wants to merge 1 commit into from
Closed

Conversation

MrEcl
Copy link

@MrEcl MrEcl commented Apr 27, 2021

Little fix to add support for whitespaces and line brakes in filename.

Copy link
Contributor

@dougwilson dougwilson left a comment

Choose a reason for hiding this comment

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

Thanks! If you can, please add a test and also link to either the specification that says this is allowed in the file name or the docs for whatever client is sending these chara.

@MrEcl
Copy link
Author

MrEcl commented Apr 28, 2021

Thanks for a fast response!

Docs for whitespaces support:

Unfortunately I am not so much familiar with tests. Do you have any suggestion how can i provide it?

@dougwilson
Copy link
Contributor

Yes,whitespace can be in filenames, butfor multipart forms they are supposed yo be encoded per the spec. I don't see anywherethay they are allowed to be sent unencoded. This module decodes them. They should be coming in as %20.

@dougwilson dougwilson closed this Apr 28, 2021
@MrEcl
Copy link
Author

MrEcl commented Apr 28, 2021

Well... they are not :) Try to upload file with name that includes 0x2028 (\u2028). Stream will be closed.
This char is common when copy/pasting text from Figma.

@dougwilson
Copy link
Contributor

What client is performing the upload? I am happy to add this is you can link to where in the multipart/formdata specification it says this is allowed. It could very well be the client is buggy. But you didnt provide links to where in the multipart/formdata specification it says this is allowed or to the client's documentation that says it will do this. I am happy to reopen if you can provide this information.

Or even a packet capture of the multupart upload occurring that has this character in it would be helpful and I can try and get the above from that.

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

Successfully merging this pull request may close these issues.

None yet

2 participants