Skip to content
This repository was archived by the owner on Nov 20, 2019. It is now read-only.

Paths with special characters and spaces return SignatureDoesNotMatch #19

Closed
mhzajac opened this issue Feb 17, 2014 · 2 comments
Closed
Assignees

Comments

@mhzajac
Copy link

mhzajac commented Feb 17, 2014

I'm not sure whether or not it is intended for paths to be encoded prior to passing to fly.s3 functions, but I'm having trouble getting this to work:

bucket add BucketFile("sample/test file.txt", "text/plain", content, Some(PRIVATE)) // will not work without URL encoding

bucket add BucketFile("sample/test&;-file.txt", "text/plain", content, Some(PRIVATE)) // works without URL encoding

bucket add BucketFile("sample/test & file.txt", "text/plain", content, Some(PRIVATE)) // will not work either way, URL encoding the path first will return SignatureDoesNotMatch

bucket add BucketFile("sample/test+&+file.txt", "text/plain", content, Some(PRIVATE)) // this will work (changing only the spaces), but is a hack
@EECOLOR EECOLOR self-assigned this Feb 18, 2014
@EECOLOR
Copy link
Member

EECOLOR commented Feb 19, 2014

Note that you still need to create your BucketFile like this: BucketFile(URLEncoder.encode(name, "UTF-8"), ...)

I can not make the bucket automatically url encode the file name because that would break backward compatibility.

@mhzajac
Copy link
Author

mhzajac commented Feb 19, 2014

Thanks for the quick response. Allowing special characters has become an unfortunate reality for me, so this helps immensely.

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

No branches or pull requests

2 participants