-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
146 lines (115 loc) · 3.37 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html>
<html>
<head>
<title>gosh! Go Share</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
* {
font-family: monospace;
}
body {
margin: 0 auto;
padding: 1rem;
width: 50%;
}
h1 {
padding-top: 3rem;
}
h2 {
padding-top: 2rem;
}
h3 {
padding-top: 1rem;
}
pre {
background-color: #eee;
padding: 0.5rem;
}
form {
padding: 0.5rem;
position: relative;
margin: auto;
background-color: #eee;
}
#grid {
display: grid;
grid-gap: 1rem;
grid-template-columns: 1fr 1fr;
grid-template-rows: repeat(3, 3rem);
margin-bottom: 1rem;
}
#grid > * {
margin: auto 0;
}
#grid input[type="checkbox"] {
margin-right: auto;
}
button {
width: 100%;
}
</style>
</head>
<body>
<h1># gosh! Go Share</h1>
<p>
Upload your files to this server and share them with your friends or, if
non-existent, shady people from the Internet.
</p>
<p>
Your file will expire after {{.Expires}} or earlier, if explicitly
specified. Optionally, the file can be deleted directly after the first
retrieval. For each upload, a deletion URL will also be generated which
can be used to delete the file before expiration. In addition, the
maximum file size is {{.Size}}.
</p>
<p>
This is no place to share questionable or illegal data. Please use another
service or stop it completely. Get some help.
</p>
<p>
The gosh software can be obtained from
<a href="https://github.com/oxzi/gosh">https://github.com/oxzi/gosh</a>
</p>
<h2>## Posting</h2>
<h3>### curl</h3>
HTTP POST your file:
<pre>$ curl -F '[email protected]' {{.Proto}}://{{.Hostname}}{{.Prefix}}/</pre>
Burn after reading:
<pre>$ curl -F '[email protected]' -F 'burn=1' {{.Proto}}://{{.Hostname}}{{.Prefix}}/</pre>
Set a custom expiry date, e.g., one minute:
<pre>$ curl -F '[email protected]' -F 'time=1m' {{.Proto}}://{{.Hostname}}{{.Prefix}}/</pre>
Or all together:
<pre>$ curl -F '[email protected]' -F 'time=1m' -F 'burn=1' {{.Proto}}://{{.Hostname}}{{.Prefix}}/</pre>
Print only URL as response:
<pre>$ curl -F '[email protected]' -F {{.Proto}}://{{.Hostname}}{{.Prefix}}/?onlyURL</pre>
<h3>### form</h3>
<form
action="{{.Proto}}://{{.Hostname}}{{.Prefix}}/"
method="POST"
enctype="multipart/form-data">
<div id="grid">
<label for="file">Your file:</label>
<input type="file" name="file" />
<label for="burn">Burn after reading:</label>
<input type="checkbox" name="burn" value="1" />
<label for="time">Optionally, set a custom expiry date:</label>
<input
type="text"
name="time"
pattern="{{.DurationPattern}}"
title="A duration string is sequence of decimal numbers, each with a unit suffix. Valid time units in order are 'y', 'mo', 'w', 'd', 'h', 'm', 's'"
/>
</div>
<button>Upload</button>
</form>
<h2>## Privacy</h2>
This software stores the IP address for each upload. This information is
stored as long as the file is available. A normal download is logged without
user information.
<h2>## Abuse</h2>
If, for whatever reason, you would like to have a file removed prematurely,
please write an e-mail to
<a href="mailto:{{.EMail}}"><{{.EMail}}></a>. Please allow me a
certain amount of time to react and work on your request.
</body>
</html>