-
-
Notifications
You must be signed in to change notification settings - Fork 87
encodeURI vs. encodeURIComponent #75
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
Comments
If I had to take a guess its because This is encouraged by AWS best practices (see the “Characters That Might Require Special Handling” section. Do you have a specific file / uri that is causing an issue? |
Take a look at this stack overflow question:
In this case, we are encoding an URI's component, so |
Please look ..
It can fetched :
Look this part
What do you think about this issue? |
You just need to add |
I know bucketPrefix option. :) I explained when prefix is not fixed. For example,
There is no way to handle this. I found similar issue and PR. |
My vote would be to just use encodeURL, but I'm adding @yomybaby's suggestion to the PR that's now handling directories. |
TFW: Amazon ignores their own recommendations: https://images-na.ssl-images-amazon.com/images/I/41l1%2BOPTfKL.jpg |
…erveFileName Support (#76) * Add support for the validateFilename method * Add AWS preserveFileName support with options for "directories" * Don't extend FilesAdapter (pre-emptive PR request) * Minor test improvements * Remove all dependencies. Bump version number * speling is hard * Don't encode / when returning urls. closes #75 * Make % safe * Allow filename validation and key generation to be methods * Parse.Error return type no longer required
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I have a question.
Is there any reason to use
encodeURIComponent
instead ofencodeURI
ingetFileLocation()
?https://github.com/parse-community/parse-server-s3-adapter/blob/master/index.js#L129
This encodes objectKey. objectKey can have
/
character. (eg.w200/myImg.png
).encodeURIComponent
encodes/
to%2F
.encodeURI
does NOT encode/
.The text was updated successfully, but these errors were encountered: