You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

495 lines
22 KiB

  1. <!doctype html>
  2. <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
  3. <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
  4. <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
  5. <!--[if gt IE 8]><!-->
  6. <html class="no-js">
  7. <!--<![endif]-->
  8. <head>
  9. <meta charset="utf-8">
  10. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  11. <title>{{.Hostname}} - Easy and fast file sharing from the command-line.</title>
  12. <meta name="description" content="Easy and fast file sharing from the command-line.">
  13. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  14. <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
  15. <link rel="stylesheet" href="styles/main.css">
  16. <link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300' rel='stylesheet' type='text/css'>
  17. <link href='//fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
  18. <script src="scripts/vendor/modernizr.js"></script>
  19. </head>
  20. <body>
  21. <div id="navigation">
  22. <div class="wrapper">
  23. <a href="/">
  24. <h1>{{.Hostname}}</h1>
  25. </a>
  26. <ul class="hidden-xs">
  27. <li><a href="#">home</a>
  28. </li>
  29. <li><a href="#samples">sample use cases</a>
  30. </li>
  31. <li><a href="#contact">contact us</a>
  32. </li>
  33. </ul>
  34. </div>
  35. </div>
  36. <section id="home">
  37. <div class="wrapper">
  38. <h2 class="page-title">
  39. Easy file sharing from the command line</h2>
  40. <div class="row animated fadeInDown">
  41. <div id="from-terminal" class="box col-md-8 col-md-offset-2 col-xs-12">
  42. <div class="terminal-top">
  43. </div>
  44. <div id="terminal" class="terminal">
  45. <code class="code-wrapper"><span class="code-title"># Upload using cURL</span>
  46. $ curl --upload-file ./hello.txt {{.WebAddress}}hello.txt {{.WebAddress}}66nb8/hello.txt
  47. <span class="code-title"># Using the shell function</span>
  48. $ transfer hello.txt
  49. ##################################################### 100.0% {{.WebAddress}}eibhM/hello.txt
  50. </code>
  51. </div>
  52. <div id="web">
  53. <code class="code-wrapper">
  54. <span class="code-title"># Upload from web</span>
  55. Drag your files here, or <a class="browse" href="#"> click to browse.</a>
  56. </code>
  57. <input type="file" multiple="multiple" style='display: none;' />
  58. <ul class='queue'>
  59. <li>
  60. </li>
  61. </ul>
  62. <div class='all-files'>
  63. <br>
  64. <div>
  65. <span class="code-title"># Download all your files</span>
  66. <br/>
  67. <br/>
  68. <a class="download-zip btn-cta" href="#">zip</a> <a class="download-tar btn-cta" href="#">tar.gz</a>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. <div>
  74. <a href="#features" class="btn-cta btn-home">learn more</i> </a>
  75. </div>
  76. </div>
  77. </section>
  78. <section id="features">
  79. <div class="wrapper container">
  80. <div class="row animated fadeInDown ">
  81. <div class="col-md-3 col-xs-6">
  82. <i class="icon-terminal"></i>
  83. <h3>Made for use with shell</h3>
  84. </div>
  85. <div class="col-md-3 col-xs-6">
  86. <i class="icon-link"></i>
  87. <h3>Share files with a URL</h3>
  88. </div>
  89. <div class="col-md-3 col-xs-6">
  90. <i class="icon-database"></i>
  91. <h3>Upload up to 500 MB</h3>
  92. </div>
  93. <div class="col-md-3 col-xs-6">
  94. <i class="icon-clock"></i>
  95. <h3>Files stored for 1 day</h3>
  96. </div>
  97. </div>
  98. <div class="row animated fadeInDown">
  99. <div class="col-md-offset-3 col-md-3 col-xs-6">
  100. <i class="icon-tag"></i>
  101. <h3>For free</h3>
  102. </div>
  103. <div class="col-md-3 col-xs-6">
  104. <i class="icon-lock"></i>
  105. <h3>Encrypt your files</h3>
  106. </div>
  107. <div class="col-md-3 col-xs-6">
  108. <i class="icon-lock"></i>
  109. <h3>Maximize amount of downloads</h3>
  110. </div>
  111. </div>
  112. </div>
  113. </section>
  114. <section id="share">
  115. <div class="wrapper">
  116. <h2 class="page-title">Preview your files in the browser!</h2>
  117. </div>
  118. </section>
  119. <section id="samples">
  120. <div class="wrapper">
  121. <h2 class="page-title">
  122. Sample use cases
  123. </h2>
  124. <div class="row">
  125. <div class="col-md-6 ">
  126. <h3>How to upload</h3>
  127. <div class="terminal-top">
  128. </div>
  129. <div class="terminal">
  130. <code class="code-wrapper"><span class="code-title"># Uploading is easy using curl</span>
  131. $ curl --upload-file ./hello.txt {{.WebAddress}}hello.txt
  132. {{.WebAddress}}66nb8/hello.txt
  133. $ curl -H "Max-Downloads: 1" -H "Max-Days: 5" --upload-file ./hello.txt {{.WebAddress}}hello.txt
  134. {{.WebAddress}}66nb8/hello.txt
  135. <span class="code-title"># Download the file</span>
  136. $ curl {{.WebAddress}}66nb8/hello.txt -o hello.txt
  137. </code>
  138. </div>
  139. </div>
  140. <div class="col-md-6 ">
  141. <h3>Add shell function to .bashrc or .zshrc</a></h3>
  142. <div class="terminal-top">
  143. </div>
  144. <div class="terminal">
  145. <code class="code-wrapper"><span class="code-title"># Add this to .bashrc or .zshrc or its equivalent</span>
  146. transfer(){ if [ $# -eq 0 ];then echo &quot;No arguments specified.\nUsage:\n transfer &lt;file|directory&gt;\n ... | transfer &lt;file_name&gt;&quot;&gt;&amp;2;return 1;fi;if tty -s;then file=&quot;$1&quot;;file_name=$(basename &quot;$file&quot;);if [ ! -e &quot;$file&quot; ];then echo &quot;$file: No such file or directory&quot;&gt;&amp;2;return 1;fi;if [ -d &quot;$file&quot; ];then file_name=&quot;$file_name.zip&quot; ,;(cd &quot;$file&quot;&amp;&amp;zip -r -q - .)|curl --progress-bar --upload-file &quot;-&quot; &quot;{{.WebAddress}}$file_name&quot;|tee /dev/null,;else cat &quot;$file&quot;|curl --progress-bar --upload-file &quot;-&quot; &quot;{{.WebAddress}}$file_name&quot;|tee /dev/null;fi;else file_name=$1;curl --progress-bar --upload-file &quot;-&quot; &quot;{{.WebAddress}}$file_name&quot;|tee /dev/null;fi;}
  147. <span class="code-title"># Now you can use transfer function</span>
  148. $ transfer hello.txt
  149. </code>
  150. </div>
  151. </div>
  152. </div>
  153. <a class="btn-cta" data-target="#coll" data-toggle="collapse">More examples</a>
  154. <div class="collapse " id="coll">
  155. <div class="row">
  156. <div class="col-md-6 ">
  157. <h3>Upload multiple files at once</h3>
  158. <div class="terminal-top">
  159. </div>
  160. <div class="terminal">
  161. <code class="code-wrapper">
  162. $ curl -i -F filedata=@/tmp/hello.txt -F filedata=@/tmp/hello2.txt {{.WebAddress}}
  163. <span class="code-title"># Combining downloads as zip or tar archive</span>
  164. $ curl {{.WebAddress}}(15HKz/hello.txt,15HKz/hello.txt).tar.gz
  165. $ curl {{.WebAddress}}(15HKz/hello.txt,15HKz/hello.txt).zip
  166. </code>
  167. </div>
  168. </div>
  169. <div class="col-md-6 ">
  170. <h3>Encrypt your files with gpg before the transfer</h3>
  171. <div class="terminal-top">
  172. </div>
  173. <div class="terminal">
  174. <code class="code-wrapper"><span class="code-title"># Encrypt files with password using gpg</span>
  175. $ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" {{.WebAddress}}test.txt
  176. <span class="code-title"># Download and decrypt</span>
  177. $ curl {{.WebAddress}}1lDau/test.txt|gpg -o- > /tmp/hello.txt
  178. </code>
  179. </div>
  180. </div>
  181. </div>
  182. <div class="row">
  183. <div class="col-md-6">
  184. <h3>Scan for malware</h3>
  185. <div class="terminal-top">
  186. </div>
  187. <div class="terminal">
  188. <code class="code-wrapper"><span class="code-title"># Scan for malware or viruses using Clamav</span>
  189. $ wget http://www.eicar.org/download/eicar.com
  190. $ curl -X PUT --upload-file ./eicar.com {{.WebAddress}}eicar.com/scan
  191. <span class="code-title"># Upload malware to VirusTotal, get a permalink in return</span>
  192. $ curl -X PUT --upload-file nhgbhhj {{.WebAddress}}test.txt/virustotal
  193. </code>
  194. </div>
  195. </div>
  196. <div class="col-md-6">
  197. <h3>Backup mysql database, encrypt and transfer</h3>
  198. <div class="terminal-top">
  199. </div>
  200. <div class="terminal">
  201. <code class="code-wrapper"><span class="code-title"># Backup, encrypt and transfer</span>
  202. $ mysqldump --all-databases|gzip|gpg -ac -o-|curl -X PUT --upload-file "-" {{.WebAddress}}test.txt</code>
  203. </div>
  204. </div>
  205. </div>
  206. <div class="row">
  207. <div class="col-md-6">
  208. <h3>Send email with transfer link (uses shell function)</h3>
  209. <div class="terminal-top">
  210. </div>
  211. <div class="terminal">
  212. <code class="code-wrapper"><span class="code-title"># Transfer and send email with link (uses shell function)</span>
  213. $ transfer /tmp/hello.txt | mail -s "Hello World" user@yourmaildomain.com
  214. </code>
  215. </div>
  216. </div>
  217. <div class="col-md-6">
  218. <h3>Using <a href="https://keybase.io/">Keybase.io</a></h3>
  219. <div class="terminal-top">
  220. </div>
  221. <div class="terminal">
  222. <code class="code-wrapper"><span class="code-title"># Import keys from keybase</span>
  223. $ keybase track [them]
  224. <span class="code-title"># Encrypt for recipient(s)</span>
  225. $ cat somebackupfile.tar.gz | keybase encrypt [them] | curl --upload-file '-' {{.WebAddress}}test.txt
  226. <span class="code-title"># Decrypt</span>
  227. $ curl {{.WebAddress}}sqUFi/test.md |keybase decrypt
  228. </code>
  229. </div>
  230. </div>
  231. </div>
  232. <div class="row">
  233. <div class="col-md-6">
  234. <h3>wget uploads also supported</h3>
  235. <div class="terminal-top">
  236. </div>
  237. <div class="terminal">
  238. <code class="code-wrapper"><span class="code-title"># wget</span>
  239. $ wget --method PUT --body-file=/tmp/file.tar {{.WebAddress}}file.tar -O - -nv
  240. </code>
  241. </div>
  242. </div>
  243. <div class="col-md-6">
  244. <h3>Transfer pound logs</h3>
  245. <div class="terminal-top">
  246. </div>
  247. <div class="terminal">
  248. <code class="code-wrapper"><span class="code-title"># grep syslog for pound and transfer</span>
  249. $ cat /var/log/syslog|grep pound|curl --upload-file - {{.WebAddress}}pound.log
  250. </code>
  251. </div>
  252. </div>
  253. </div>
  254. <div class="row">
  255. <div class="col-md-6">
  256. <h3>Upload a file using Powershell</h3>
  257. <div class="terminal-top">
  258. </div>
  259. <div class="terminal">
  260. <code class="code-wrapper"><span class="code-title"># Upload using Powershell</span>
  261. PS H:\&gt; invoke-webrequest -method put -infile .\file.txt {{.WebAddress}}file.txt
  262. </code>
  263. </div>
  264. </div>
  265. <div class="col-md-6">
  266. <h3>Upload a file using HTTPie</h3>
  267. <div class="terminal-top">
  268. </div>
  269. <div class="terminal">
  270. <code class="code-wrapper"><span class="code-title"># HTTPie</span>
  271. $ http {{.WebAddress}} -vv &lt; /tmp/test.log
  272. </code>
  273. </div>
  274. </div>
  275. </div>
  276. <div class="row">
  277. <div class="col-md-6">
  278. <h3>Upload a file using Unofficially client in Python</h3>
  279. <div class="terminal-top">
  280. </div>
  281. <div class="terminal">
  282. <code class="code-wrapper">
  283. <span class="code-title"># transfersh-cli (https://github.com/tanrax/transfersh-cli)</span>
  284. $ trasnfersh photos.zip
  285. <span class="code-title"># Uploading file</span>
  286. <span class="code-title"># Download from here: {{.WebAddress}}xxxxxx/photos.zip</span>
  287. <span class="code-title"># It has also been copied to the clipboard!</span>
  288. </code>
  289. </div>
  290. </div>
  291. <div class="col-md-6">
  292. <h3>Encrypt your files with openssl before the transfer</h3>
  293. <div class="terminal-top">
  294. </div>
  295. <div class="terminal">
  296. <code class="code-wrapper"><span class="code-title"># Encrypt files with password using openssl</span>
  297. $ cat /tmp/hello.txt|openssl aes-256-cbc -pbkdf2 -e|curl -X PUT --upload-file "-" {{.WebAddress}}test.txt
  298. <span class="code-title"># Download and decrypt</span>
  299. $ curl {{.WebAddress}}1lDau/test.txt|openssl aes-256-cbc -pbkdf2 -d > /tmp/hello.txt
  300. </code>
  301. </div>
  302. </div>
  303. </div>
  304. <div class="row">
  305. <div class="col-md-6">
  306. <h3>Upload a file or directory in Windows</h3>
  307. <div class="terminal-top">
  308. </div>
  309. <div class="terminal">
  310. <code class="code-wrapper"><span class="code-title">#Save this as transfer.cmd in Windows 10 (which has curl.exe)</span>
  311. @echo off
  312. setlocal EnableDelayedExpansion EnableExtensions
  313. goto main
  314. :usage
  315. echo No arguments specified. &gt;&amp;2
  316. echo Usage: &gt;&amp;2
  317. echo transfer ^&lt;file^|directory^&gt; &gt;&amp;2
  318. echo ... ^| transfer ^&lt;file_name^&gt; &gt;&amp;2
  319. exit /b 1
  320. :main
  321. if "%~1" == "" goto usage
  322. timeout.exe /t 0 &gt;nul 2&gt;nul || goto not_tty
  323. set "file=%~1"
  324. for %%A in ("%file%") do set "file_name=%%~nxA"
  325. if exist "%file_name%" goto file_exists
  326. echo %file%: No such file or directory &gt;&amp;2
  327. exit /b 1
  328. :file_exists
  329. if not exist "%file%\" goto not_a_directory
  330. set "file_name=%file_name%.zip"
  331. pushd "%file%" || exit /b 1
  332. set "full_name=%temp%\%file_name%"
  333. powershell.exe -Command "Get-ChildItem -Path . -Recurse | Compress-Archive -DestinationPath ""%full_name%"""
  334. curl.exe --progress-bar --upload-file "%full_name%" "{{.WebAddress}}%file_name%"
  335. popd
  336. goto :eof
  337. :not_a_directory
  338. curl.exe --progress-bar --upload-file "%file%" "{{.WebAddress}}%file_name%"
  339. goto :eof
  340. :not_tty
  341. set "file_name=%~1"
  342. curl.exe --progress-bar --upload-file - "{{.WebAddress}}%file_name%"
  343. goto :eof
  344. </code>
  345. </div>
  346. </div>
  347. <div class="col-md-6">
  348. <h3>Send us your awesome example</h3>
  349. <div class="terminal-top">
  350. </div>
  351. <div class="terminal">
  352. <code class="code-wrapper"><span class="code-title"># Your awesome sample will be put here</span>
  353. </code>
  354. </div>
  355. </div>
  356. </div>
  357. </div>
  358. </div>
  359. </section>
  360. <section id="reviews">
  361. <div class="wrapper">
  362. <div class="row">
  363. <div class="col-md-8 col-md-offset-2 col-xs-12">
  364. <blockquote class="twitter-tweet tweet-xl" lang="en">
  365. <a href="https://twitter.com/FloifyDave/status/517383101425516544">
  366. <img class="twitter-profile" src="images/reviews/dave.jpg" alt="">
  367. </a>
  368. <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>
  369. <a href="https://twitter.com/FloifyDave/status/517383101425516544">
  370. &mdash; Dave Sims (@FloifyDave)</a>
  371. </blockquote>
  372. </div>
  373. </div>
  374. <div class="row">
  375. <div class="col-md-6 col-xs-12">
  376. <blockquote class="twitter-tweet" lang="en">
  377. <a href="https://twitter.com/kareemk/status/517029789191118849">
  378. <img class="twitter-profile" src="images/reviews/kareem.jpg" alt="">
  379. </a>
  380. <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">&mdash; Kareem Kouddous (@kareemk) </a>
  381. </blockquote>
  382. </div>
  383. <div class="col-md-6 col-xs-12">
  384. <blockquote class="twitter-tweet" lang="en">
  385. <a href="https://twitter.com/drakpz/status/517008058841829376">
  386. <img class="twitter-profile" src="images/reviews/pg.jpeg" alt="">
  387. </a>
  388. <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">&mdash; PJ Spagnolatti (@drakpz)</a>
  389. </blockquote>
  390. </div>
  391. </div>
  392. <div class="row">
  393. <div class="col-md-6 col-xs-12">
  394. <blockquote class="twitter-tweet" lang="en">
  395. <a href="https://twitter.com/jacoblindgren11/status/516975006501203968">
  396. <img class="twitter-profile" src="images/reviews/jacob.jpg" alt="">
  397. </a>
  398. <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>
  399. </p><a href="https://twitter.com/jacoblindgren11/status/516975006501203968">&mdash; Jacob Lindgren (@jacoblindgren11) </a>
  400. </blockquote>
  401. </div>
  402. <div class="col-md-6 col-xs-12">
  403. <blockquote class="twitter-tweet" lang="en">
  404. <a href="https://twitter.com/arvestad/status/519507976491499521">
  405. <img class="twitter-profile" src="images/reviews/lars.jpg" alt="">
  406. </a>
  407. <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>&#10;Thanks <a href="https://twitter.com/dutchcoders">@dutchcoders</a> !</p> <a href="https://twitter.com/arvestad/status/519507976491499521">&mdash; Lars Arvestad (@arvestad)</a>
  408. </blockquote>
  409. </div>
  410. </div>
  411. </div>
  412. </section>
  413. <section id="contact">
  414. <div class="wrapper">
  415. <i class="icon-mail"></i>
  416. <h2 class="page-title">
  417. Any questions?
  418. </h2>
  419. <a href="#" data-uv-trigger class="btn-cta">contact us</a>
  420. </div>
  421. </section>
  422. <footer>
  423. <div class="wrapper">
  424. <div style="">
  425. <a href="bitcoin:164ybRMLbg1dhhWWiUkXtiNr7jUhMKdJqH" label="Bitcoin+Donation" style="word-wrap: break-word;">
  426. <img border="0" src="images/bitcoin.png" style="margin: 0 auto;;">
  427. </a>
  428. </div>
  429. <br/>
  430. <br/>
  431. <img src="images/Logo-orange.png" alt="Founded in Holland">
  432. <p>Made with <i class="icon-heart"></i> by <a href="http://blog.dutchcoders.io/" title="Dutch Coders">Dutch Coders</a>
  433. </p>
  434. </div>
  435. </footer>
  436. <a href="https://github.com/dutchcoders/transfer.sh"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
  437. <!--[if lt IE 7]>
  438. <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
  439. <![endif]-->
  440. <script src="./scripts/main.js"></script>
  441. </body>
  442. </html>