├── .gitignore
├── LICENSE
├── README.md
├── favicon.ico
├── index.html
└── logo.png
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .idea/
3 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Bengt Brodersen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AWS S3 Bucket Browser [](https://github.com/qoomon/starlines)
2 |
3 | 
4 |
5 | Single HTML file to browse AWS S3 buckets
6 | ## [Demo](https://qoomon.github.io/aws-s3-bucket-browser/index.html?bucket=https://s3.amazonaws.com/spacenet-dataset#)
7 |
8 | ## Features
9 | * Compatible Providers: [](https://cloud.google.com) [](https://ibm.com/cloud) [](https://digitalocean.com)
10 | * List all files in a table view
11 | * Treat and display `/` in keys as folders
12 | * Render preview for Markdown files
13 | * Show `Install` button for `manifest.plist` on iOS devices
14 |
15 | ## Installation
16 |
17 | #### Self-Hosted
18 | Click me
20 |
21 | * Just download [`index.html`](index.html) and upload it to your bucket.
22 | * Adjust [config](index.html#L8-L37) within `index.html` if needed, e.g.
23 | ```js
24 | const config = {
25 | title: 'Bucket Browser', // prefix value with `HTML> ` to render as html, see subtitle
26 | subtitle: 'HTML>made with ♥ by qoomon', // prefix value with `HTML> ` to render as html
27 | logo: 'https://qoomon.github.io/aws-s3-bucket-browser/logo.png',
28 | favicon: 'https://qoomon.github.io/aws-s3-bucket-browser/favicon.ico',
29 | primaryColor: '#167df0',
30 |
31 | bucketUrl: undefined,
32 | // If bucketUrl is undefined, this script tries to determine bucket Rest API URL from this file location itself.
33 | // This will only work for locations like these
34 | // * https://s3.amazonaws.com/BUCKET-NAME/index.html
35 | // * https://s3.BUCKET-REGION.amazonaws.com/BUCKET-NAME/index.html
36 | // * http://BUCKET-NAME.s3-website-BUCKET-REGION.amazonaws.com/index.html
37 | // * https://storage.googleapis.com/BUCKET-NAME/index.html
38 | // * https://BUCKET-NAME.s3-web.BUCKET-REGION.cloud-object-storage.appdomain.cloud/
39 | // * https://BUCKET-NAME.BUCKET-REGION.digitaloceanspaces.com
40 | // * https://BUCKET-NAME.BUCKET-REGION.cdn.digitaloceanspaces.com
41 | // If bucketUrl is set manually, ensure this is the bucket Rest API URL, e.g.
42 | // * https://s3.amazonaws.com/BUCKET-NAME
43 | // * https://storage.googleapis.com/BUCKET-NAME
44 | // The URL should return an XML document with Click me
120 |
121 | * ##### ⚠️ Ensure Bucket Permissions
122 | * see [Self-Hosted](#self-hosted)
123 | * ##### ⚠️ Ensure Bucket CORS
124 | * see [Self-Hosted](#self-hosted)
125 | * Open hosted `index.html` in your browser and provide bucket url as `bucket` request parameter
126 | * `${INDEX_FILE_LOCATION}?bucket=${S3_BUCKET_URL}`
127 | * e.g. [`https://qoomon.github.io/aws-s3-bucket-browser/index.html?bucket=https://s3.eu-west-1.amazonaws.com/data.openspending.org`](https://qoomon.github.io/aws-s3-bucket-browser/index.html?bucket=https://s3.eu-west-1.amazonaws.com/data.openspending.org)
128 |
129 | Click me
134 |
135 | If you use CloudFront in front of your S3 bucket ensure following CloudFront settings.
136 | - Allowed/Cached HTTP Methods: `GET`, `HEAD`, `OPTIONS`
137 | - Cached Based on Selected Headers: `Whitelist`
138 | - `Access-Control-Request-Headers`
139 | - `Access-Control-Request-Method`
140 | - `Origin`
141 | - Query String Forwarding and Caching: `Forward all`
142 |
143 | Click me
148 |
149 | IBM Cloud Object storage only supports virtual host-style addressing, i.e. `https://