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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: Hiding specific folders from view.

Gyozomgarg opened this issue · comments

With the current head of main (4de1fd0), I would like to be able to remove a folder from the list of objects similarly to the index.html.
Is there any way to do so?

I have attempted adding the following to hide a folder named static-website-assets after the filter for index.html.

console.log("Filter: remove static-website-assets/");
data.Contents = data.Contents.filter(function(el) {
  return el.Key !== "static-website-assets/";
});

Is there currently any support for this type of functionality or is there a proper way to manually implement it?

I was able to hide the folder by including:
$.fn.dataTableExt.afnFiltering.push((_, data) => data[0] !== "static-website-assets/") after the "hide folders" check and filter.

Hopefully this could be of some use to anyone who may want to do something similar.