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.
 
 
 
 

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