-
Notifications
You must be signed in to change notification settings - Fork 104
/
index.html
499 lines (455 loc) · 23 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<!--<![endif]-->
include "includes/head.html"
<body>
<script>
var gaKey = "{{.GAKey}}";
if (gaKey != "") {
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', gaKey, 'transfer.sh');
ga('send', 'pageview');
}
</script>
include "includes/navigation.html"
<section id="home">
<div class="wrapper">
<h2 class="page-title">
Easy file sharing from the command line</h2>
<div class="row animated fadeInDown">
<div id="from-terminal" class="box col-md-8 col-md-offset-2 col-xs-12">
<div class="terminal-top">
</div>
<div id="terminal" class="terminal">
<code class="code-wrapper"><span class="code-title"># Upload using cURL</span>
$ curl --upload-file ./hello.txt {{.WebAddress}}hello.txt
{{.WebAddress}}{{.SampleToken}}/hello.txt
<span class="code-title"># Using the shell function</span>
$ transfer hello.txt
##################################################### 100.0%
{{.WebAddress}}{{.SampleToken2}}/hello.txt
</code>
</div>
<div id="web">
<code class="code-wrapper">
<span class="code-title"># Upload from web</span>
Drag your files here, or <a class="browse" href="#"> click to browse.</a>
</code>
<input type="file" multiple="multiple" style='display: none;' />
<ul class='queue'>
<li>
</li>
</ul>
<div class='all-files'>
<br>
<div>
<span class="code-title"># Download all your files</span>
<br/>
<br/>
<a class="download-zip btn-cta" href="#">zip</a> <a class="download-tar btn-cta" href="#">tar.gz</a>
</div>
</div>
</div>
</div>
<div>
<a href="#features" class="btn-cta btn-home">learn more</i> </a>
</div>
</div>
</section>
<section id="features">
<div class="wrapper container">
<div class="row animated fadeInDown ">
<div class="col-md-3 col-xs-6">
<i class="icon-terminal"></i>
<h3>Made for use with shell</h3>
</div>
<div class="col-md-3 col-xs-6">
<i class="icon-link"></i>
<h3>Share files with a URL</h3>
</div>
<div class="col-md-3 col-xs-6">
<i class="icon-database"></i>
{{ if .MaxUploadSize }}
<h3>Upload up to {{ .MaxUploadSize }}</h3>
{{ else }}
<h3>Unlimited upload</h3>
{{ end }}
</div>
<div class="col-md-3 col-xs-6">
<i class="icon-clock"></i>
{{ if .PurgeTime }}
<h3>Files stored for {{ .PurgeTime }}</h3>
{{ else }}
<h3>Files stored forever</h3>
{{ end }}
</div>
</div>
<div class="row animated fadeInDown">
<div class="col-md-offset-3 col-md-3 col-xs-6">
<i class="icon-tag"></i>
<h3>For free</h3>
</div>
<div class="col-md-3 col-xs-6">
<i class="icon-lock"></i>
<h3>Encrypt your files</h3>
</div>
<div class="col-md-3 col-xs-6">
<i class="icon-lock"></i>
<h3>Maximize amount of downloads</h3>
</div>
</div>
</div>
</section>
<section id="share">
<div class="wrapper">
<h2 class="page-title">Preview your files in the browser!</h2>
</div>
</section>
<section id="samples">
<div class="wrapper">
<h2 class="page-title">
Sample use cases
</h2>
<div class="row">
<div class="col-md-6 ">
<h3>How to upload</h3>
<div class="terminal-top">
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># Uploading is easy using curl</span>
$ curl --upload-file ./hello.txt {{.WebAddress}}hello.txt
{{.WebAddress}}{{.SampleToken}}/hello.txt
$ curl -H "Max-Downloads: 1" -H "Max-Days: 5" --upload-file ./hello.txt {{.WebAddress}}hello.txt
{{.WebAddress}}{{.SampleToken}}/hello.txt
<span class="code-title"># Download the file</span>
$ curl {{.WebAddress}}{{.SampleToken}}/hello.txt -o hello.txt
</code>
</div>
</div>
<div class="col-md-6 ">
<h3>Add shell function to .bashrc or .zshrc</a></h3>
<div class="terminal-top">
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># Add this to .bashrc or .zshrc or its equivalent</span>
transfer(){ if [ $# -eq 0 ];then echo "No arguments specified.\nUsage:\n transfer <file|directory>\n ... | transfer <file_name>">&2;return 1;fi;if tty -s;then file="$1";file_name=$(basename "$file");if [ ! -e "$file" ];then echo "$file: No such file or directory">&2;return 1;fi;if [ -d "$file" ];then file_name="$file_name.zip" ,;(cd "$file"&&zip -r -q - .)|curl --progress-bar --upload-file "-" "{{.WebAddress}}$file_name"|tee /dev/null,;else cat "$file"|curl --progress-bar --upload-file "-" "{{.WebAddress}}$file_name"|tee /dev/null;fi;else file_name=$1;curl --progress-bar --upload-file "-" "{{.WebAddress}}$file_name"|tee /dev/null;fi;}
<span class="code-title"># Now you can use transfer function</span>
$ transfer hello.txt
</code>
</div>
</div>
</div>
<a class="btn-cta" data-target="#coll" data-toggle="collapse">More examples</a>
<div class="collapse " id="coll">
<div class="row">
<div class="col-md-6 ">
<h3>Upload multiple files at once</h3>
<div class="terminal-top">
</div>
<div class="terminal">
<code class="code-wrapper">
$ curl -i -F filedata=@/tmp/hello.txt -F filedata=@/tmp/hello2.txt {{.WebAddress}}
<span class="code-title"># Combining downloads as zip or tar archive</span>
$ curl {{.WebAddress}}({{.SampleToken}}/hello.txt,{{.SampleToken2}}/world.txt).tar.gz
$ curl {{.WebAddress}}({{.SampleToken}}/hello.txt,{{.SampleToken2}}/world.txt).zip
</code>
</div>
</div>
<div class="col-md-6 ">
<h3>Encrypt your files with gpg before the transfer</h3>
<div class="terminal-top">
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># Encrypt files with password using gpg</span>
$ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" {{.WebAddress}}test.txt
<span class="code-title"># Download and decrypt</span>
$ curl {{.WebAddress}}{{.SampleToken}}/test.txt|gpg -o- > /tmp/hello.txt
</code>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>Scan for malware</h3>
<div class="terminal-top">
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># Scan for malware or viruses using Clamav</span>
$ wget http://www.eicar.org/download/eicar.com
$ curl -X PUT --upload-file ./eicar.com {{.WebAddress}}eicar.com/scan
<span class="code-title"># Upload malware to VirusTotal, get a permalink in return</span>
$ curl -X PUT --upload-file nhgbhhj {{.WebAddress}}test.txt/virustotal
</code>
</div>
</div>
<div class="col-md-6">
<h3>Backup mysql database, encrypt and transfer</h3>
<div class="terminal-top">
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># Backup, encrypt and transfer</span>
$ mysqldump --all-databases|gzip|gpg -ac -o-|curl -X PUT --upload-file "-" {{.WebAddress}}test.txt</code>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>Send email with transfer link (uses shell function)</h3>
<div class="terminal-top">
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># Transfer and send email with link (uses shell function)</span>
$ transfer /tmp/hello.txt | mail -s "Hello World" user@yourmaildomain.com
</code>
</div>
</div>
<div class="col-md-6">
<h3>Using <a href="https://keybase.io/">Keybase.io</a></h3>
<div class="terminal-top">
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># Import keys from keybase</span>
$ keybase track [them]
<span class="code-title"># Encrypt for recipient(s)</span>
$ cat somebackupfile.tar.gz | keybase encrypt [them] | curl --upload-file '-' {{.WebAddress}}test.txt
<span class="code-title"># Decrypt</span>
$ curl {{.WebAddress}}{{.SampleToken}}/test.md |keybase decrypt
</code>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>wget uploads also supported</h3>
<div class="terminal-top">
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># wget</span>
$ wget --method PUT --body-file=/tmp/file.tar {{.WebAddress}}file.tar -O - -nv
</code>
</div>
</div>
<div class="col-md-6">
<h3>Transfer pound logs</h3>
<div class="terminal-top">
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># grep syslog for pound and transfer</span>
$ cat /var/log/syslog|grep pound|curl --upload-file - {{.WebAddress}}pound.log
</code>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>Upload a file using Powershell</h3>
<div class="terminal-top">
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># Upload using Powershell</span>
PS H:\> invoke-webrequest -method put -infile .\file.txt {{.WebAddress}}file.txt
</code>
</div>
</div>
<div class="col-md-6">
<h3>Upload a file using HTTPie</h3>
<div class="terminal-top">
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># HTTPie</span>
$ http {{.WebAddress}} -vv < /tmp/test.log
</code>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>Upload a file using Unofficially client in Python</h3>
<div class="terminal-top">
</div>
<div class="terminal">
<code class="code-wrapper">
<span class="code-title"># transfersh-cli (https://github.com/tanrax/transfersh-cli)</span>
$ transfersh photos.zip
<span class="code-title"># Uploading file</span>
<span class="code-title"># Download from here: {{.WebAddress}}{{.SampleToken}}/photos.zip</span>
<span class="code-title"># It has also been copied to the clipboard!</span>
</code>
</div>
</div>
<div class="col-md-6">
<h3>Encrypt your files with openssl before the transfer</h3>
<div class="terminal-top">
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># Encrypt files with password using openssl</span>
$ cat /tmp/hello.txt|openssl aes-256-cbc -pbkdf2 -e|curl -X PUT --upload-file "-" {{.WebAddress}}test.txt
<span class="code-title"># Download and decrypt</span>
$ curl {{.WebAddress}}{{.SampleToken}}/test.txt|openssl aes-256-cbc -pbkdf2 -d > /tmp/hello.txt
</code>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>Upload a file or directory in Windows</h3>
<div class="terminal-top">
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title">#Save this as transfer.cmd in Windows 10 (which has curl.exe)</span>
@echo off
setlocal EnableDelayedExpansion EnableExtensions
goto main
:usage
echo No arguments specified. >&2
echo Usage: >&2
echo transfer ^<file^|directory^> >&2
echo ... ^| transfer ^<file_name^> >&2
exit /b 1
:main
if "%~1" == "" goto usage
timeout.exe /t 0 >nul 2>nul || goto not_tty
set "file=%~1"
for %%A in ("%file%") do set "file_name=%%~nxA"
if exist "%file_name%" goto file_exists
echo %file%: No such file or directory >&2
exit /b 1
:file_exists
if not exist "%file%\" goto not_a_directory
set "file_name=%file_name%.zip"
pushd "%file%" || exit /b 1
set "full_name=%temp%\%file_name%"
powershell.exe -Command "Get-ChildItem -Path . -Recurse | Compress-Archive -DestinationPath ""%full_name%"""
curl.exe --progress-bar --upload-file "%full_name%" "{{.WebAddress}}%file_name%"
popd
goto :eof
:not_a_directory
curl.exe --progress-bar --upload-file "%file%" "{{.WebAddress}}%file_name%"
goto :eof
:not_tty
set "file_name=%~1"
curl.exe --progress-bar --upload-file - "{{.WebAddress}}%file_name%"
goto :eof
</code>
</div>
</div>
<div class="col-md-6">
<h3>Send us your awesome example</h3>
<div class="terminal-top">
</div>
<div class="terminal">
<code class="code-wrapper"><span class="code-title"># Your awesome sample will be put here</span>
</code>
</div>
</div>
</div>
</div>
</div>
</section>
<section id="share">
<div class="wrapper">
<h2 class="page-title">Follow on GitHub</h2>
<br>
<br>
<iframe src="https://ghbtns.com/github-btn.html?user=dutchcoders&repo=transfer.sh&type=follow&count=true&size=large" allowtransparency="true" frameborder="0" scrolling="0" width="250" height="50"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=dutchcoders&repo=transfer.sh&type=watch&count=true&size=large" allowtransparency="true" frameborder="0" scrolling="0" width="200" height="50"></iframe>
</div>
</section>
<section id="reviews">
<div class="wrapper">
<div class="row">
<div class="col-md-8 col-md-offset-2 col-xs-12">
<blockquote class="twitter-tweet tweet-xl" lang="en">
<a href="https://twitter.com/FloifyDave/status/517383101425516544">
<img class="twitter-profile" src="images/reviews/dave.jpg" alt="">
</a>
<p><a href="https://twitter.com/dutchcoders">@dutchcoders</a> Thanks for transfer.sh. Just used it for a production purpose for a customer. So great, so easy, so https. :)</p>
<a href="https://twitter.com/FloifyDave/status/517383101425516544">
— Dave Sims (@FloifyDave)</a>
</blockquote>
</div>
</div>
<div class="row">
<div class="col-md-6 col-xs-12">
<blockquote class="twitter-tweet" lang="en">
<a href="https://twitter.com/kareemk/status/517029789191118849">
<img class="twitter-profile" src="images/reviews/kareem.jpg" alt="">
</a>
<p><a href="https://twitter.com/dutchcoders">@dutchcoders</a> love transfer.sh! any change we can *pay* for a self-hosted version?</p><a href="https://twitter.com/kareemk/status/517029789191118849">— Kareem Kouddous (@kareemk) </a>
</blockquote>
</div>
<div class="col-md-6 col-xs-12">
<blockquote class="twitter-tweet" lang="en">
<a href="https://twitter.com/drakpz/status/517008058841829376">
<img class="twitter-profile" src="images/reviews/pg.jpeg" alt="">
</a>
<p><a href="http://t.co/JomAmqWYEB">http://t.co/JomAmqWYEB</a> by <a href="https://twitter.com/dutchcoders">@dutchcoders</a> is pure awesomeness! any chance of source on github? :-)</p><a href="https://twitter.com/drakpz/status/517008058841829376">— PJ Spagnolatti (@drakpz)</a>
</blockquote>
</div>
</div>
<div class="row">
<div class="col-md-6 col-xs-12">
<blockquote class="twitter-tweet" lang="en">
<a href="https://twitter.com/jacoblindgren11/status/516975006501203968">
<img class="twitter-profile" src="images/reviews/jacob.jpg" alt="">
</a>
<p>Love transfer.sh! Will be using it from now on! Thanks for the amazing service we can use from the CLI <a href="https://twitter.com/dutchcoders">@dutchcoders</a>
</p><a href="https://twitter.com/jacoblindgren11/status/516975006501203968">— Jacob Lindgren (@jacoblindgren11) </a>
</blockquote>
</div>
<div class="col-md-6 col-xs-12">
<blockquote class="twitter-tweet" lang="en">
<a href="https://twitter.com/arvestad/status/519507976491499521">
<img class="twitter-profile" src="images/reviews/lars.jpg" alt="">
</a>
<p>transfer.sh is my latest fav service! Try simple command-line and web file sharing! <a href="https://t.co/FSrsb1JKJd">https://t.co/FSrsb1JKJd</a> Thanks <a href="https://twitter.com/dutchcoders">@dutchcoders</a> !</p> <a href="https://twitter.com/arvestad/status/519507976491499521">— Lars Arvestad (@arvestad)</a>
</blockquote>
</div>
</div>
</div>
</section>
<section id="share">
<div class="wrapper">
<h2 class="page-title">Share the love</h2>
<ul class="share-buttons">
<li>
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Ftransfer.sh&t=" target="_blank" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(document.URL) + '&t=' + encodeURIComponent(document.URL)); return false;"> <i class="icon-facebook"></i>
</a>
</li>
<li>
<a href="https://twitter.com/intent/tweet?source=http%3A%2F%2Ftransfer.sh&text=:%20http%3A%2F%2Ftransfer.sh" target="_blank" title="Tweet" onclick="window.open('https://twitter.com/intent/tweet?text=' + encodeURIComponent(document.title) + ':%20' + encodeURIComponent(document.URL)); return false;"> <i class="icon-twitter"></i>
</li>
<li>
<a href="http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Ftransfer.sh&title=&summary=&source=http%3A%2F%2Ftransfer.sh" target="_blank" title="Share on LinkedIn" onclick="window.open('http://www.linkedin.com/shareArticle?mini=true&url=' + encodeURIComponent(document.URL) + '&title=' + encodeURIComponent(document.title)); return false;"> <i class="icon-linkedin"></i>
</a>
</li>
</ul>
</div>
</section>
<section id="contact">
<div class="wrapper">
<i class="icon-mail"></i>
<h2 class="page-title">
Any questions?
</h2>
<a href="mailto:{{.EmailContact}}" data-uv-trigger class="btn-cta">contact us</a>
</div>
</section>
include "includes/footer.html"
include "includes/js.html"
</body>
</html>