-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
66 lines (56 loc) · 2.07 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>List public S3 buckets</title>
<meta name=viewport content="width=device-width, initial-scale=1">
<meta name="description" content="List a S3 bucket with public listing permissions" />
<link rel=icon href=bucket.svg sizes="any" type="image/svg+xml">
<style>
body { font-size: 1.2em; font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif }
input[type=url] { padding: 0.2em; width: 25em; font-size: 1.5em; }
ul { list-style-image: url('bucket.svg') }
</style>
</head>
<body>
<form action="listbuckets.php" method="POST">
<ul id=buckets>
<li><input type=url name=bucket[] value="https://s3-ap-southeast-1.amazonaws.com/archpi.dabase.com"></li>
</ul>
<button onclick='addBucket(); return false;'>Add bucket</button>
<input type=submit value="Index bucket">
</form>
<script>
function addBucket() {
var el = document.getElementById('buckets');
var li = document.createElement('li');
li.innerHTML = "<li><input type=url name=bucket[]></li>";
el.appendChild(li);
}
</script>
<h3>Can be command line driven</h3>
<p>Using the bucket <code>s3://archpi.dabase.com</code> as an example</p>
<pre>
curl -F "bucket=https://s3-ap-southeast-1.amazonaws.com/archpi.dabase.com" http://s3.dabase.com/listbuckets.php
</pre>
<p>or</p>
<pre>
$ git clone https://github.com/kaihendry/s3listing.git
$ cd s3listing/
$ https://s3-ap-southeast-1.amazonaws.com/archpi.dabase.com | ./listing.sh
</pre>
<h3>What is the bucket URL?</h3>
<p>Using the bucket <code>s3://archpi.dabase.com</code> as an example</p>
<p><a
href="http://s3.amazonaws.com/archpi.dabase.com">http://s3.amazonaws.com/archpi.dabase.com</a>
will redirect to <a
href="http://archpi.dabase.com.s3.amazonaws.com/">http://archpi.dabase.com.s3.amazonaws.com/</a>,
though to get the https URL I found you need to know the region.</p> <h3><a
href=http://s.natalian.org/2015-10-17/1445092754_958x548.png>Permission
denied</a>?</h3>
<pre>
aws s3api put-bucket-acl --bucket archpi.dabase.com --acl public-read
</pre>
<p><a href=https://github.com/kaihendry/s3listing>Source code</a></p>
</body>
</html>