qoomon / aws-s3-bucket-browser

Single page application to browse AWS S3 bucket content
https://qoomon.github.io/aws-s3-bucket-browser/index.html?bucket=https://s3.amazonaws.com/spacenet-dataset#
MIT License
246 stars 85 forks source link

Does keyExcludePatterns exclude folders? #5

Closed jackngai closed 4 years ago

jackngai commented 4 years ago

Awesome browser! Way nicer than what I seen out there.

I have been playing with the keyExcludePatterns and I can't seem to exclude folders. Is it supported?

qoomon commented 4 years ago

Actually s3 does not know the concept of folders, every file has a key "absolute file path" may you can provide the regex and the key "absolute folder path" that does not match?

FetaCini commented 4 years ago

Firstly thanks a lot for this, but I'm having the same issue. I can hide files but not "folders"

For example I have the following: CBA_Driver/ index.html index1.html

If I use

keyExcludePatterns: [ /^index*/ ]

it hides both of the index.html files as I would expect. However if I try

keyExcludePatterns: [ /^CBA*/ ],

it hides the files in CBA_Driver but not the actual folder from showing up. Is it possible to hide the folder and everything in it?

FetaCini commented 4 years ago

I (think) I've fixed this and added a pull request...

qoomon commented 4 years ago

Thx for your PR. I've merged them already 😁