Skip to content

Commit

Permalink
Fixes awslabs#33
Browse files Browse the repository at this point in the history
  • Loading branch information
john-aws committed Jan 3, 2019
1 parent 316c795 commit 1262d81
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
<script src="https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap.min.js"></script>

<script type="text/javascript">
var HIDE_INDEX = true;
var s3exp_config = {
Region: '',
Bucket: '',
Expand Down Expand Up @@ -381,6 +382,14 @@
return el.Key !== scope.params.Prefix;
});

// Optionally, filter the root index.html out of the listed S3 objects
if (HIDE_INDEX) {
console.log("Filter: remove index.html");
data.Contents = data.Contents.filter(function(el) {
return el.Key !== "index.html";
});
}

// Accumulate the S3 objects and common prefixes
scope.Contents.push.apply(scope.Contents, data.Contents);
scope.CommonPrefixes.push.apply(scope.CommonPrefixes, data.CommonPrefixes);
Expand Down

0 comments on commit 1262d81

Please sign in to comment.