rufuspollock / s3-bucket-listing

Create nice directory listings for s3 buckets with javascript and HTML.
691 stars 300 forks source link

Encode directory paths passed in the `prefix` URL parameter #91

Closed coreywright closed 5 years ago

coreywright commented 5 years ago

As list.js passes through the prefix parameter to the S3 request's prefix parameter and S3 documentation calls out characters in a key name that "likely need to be URL encoded", encode directory paths the same as file paths for use in href, including not encoding forwardslashes.

Refactor encoding and decoding of forwardslashes into a function now that it's used more than once.

rufuspollock commented 5 years ago

@coreywright thanks for this. LGTM. Merging.

Also can i confirm you are happy for your contribution to be "public domain"?

coreywright commented 5 years ago

Also can i confirm you are happy for your contribution to be "public domain"?

I presumed my contribution would be under the MIT license (which is "public domain" plus attribution) as that is the project's advertised license (having read https://github.com/rufuspollock/s3-bucket-listing#copyright-and-license).

Thanks for s3-bucket-listing!