awslabs / aws-js-s3-explorer

AWS JavaScript S3 Explorer is a JavaScript application that uses AWS's JavaScript SDK and S3 APIs to make the contents of an S3 bucket easy to browse via a web browser.
Apache License 2.0
818 stars 273 forks source link

Specific Folder access Only #78

Open janamcroods opened 4 years ago

janamcroods commented 4 years ago

Hi , how to make this to explore inside specific folder. i mean to say i don't want to show root of bucket instead i want to explore files and folders inside of specific folder.

john-aws commented 4 years ago

One option would be to fork the code and customize the 'prefix' behavior. The explorer shows objects under a specific S3 key prefix. which defaults to '' (for the root of the S3 bucket) and the explorer allows the user to choose which prefix to use (via the settings dialog).

You could modify the software to start with a certain prefix in $scope.settings (see the SettingsController function. You would then need to modify the source code to constrain the user to that initial prefix or below, so they could not move above it. I think this would not be too complex to implement. I'm happy to consider merging a change if it's written in a way that fits well with the current code, is suppressed by default, and is easy to enable for you and other users who might want this feature.