mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-27 14:40:18 +01:00
merging issues
This commit is contained in:
commit
a3ae3984e9
13 changed files with 102 additions and 570 deletions
3
.bowerrc
Normal file
3
.bowerrc
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"directory": "transfersh-web/bower_components"
|
||||||
|
}
|
30
README.md
30
README.md
|
@ -1,6 +1,6 @@
|
||||||
# transfer.sh
|
# transfer.sh
|
||||||
|
|
||||||
Easy and fast file sharing from the command-line. This code contains the server with everything you need to create your own instance.
|
Easy and fast file sharing from the command-line. This code contains the server with everything you need to create your own instance. Transfer.sh currently runs on top of Amazon S3. Other storage types will be added shortly.
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/dutchcoders/transfer.sh.svg?branch=master)](https://travis-ci.org/dutchcoders/transfer.sh)
|
[![Build Status](https://travis-ci.org/dutchcoders/transfer.sh.svg?branch=master)](https://travis-ci.org/dutchcoders/transfer.sh)
|
||||||
|
|
||||||
|
@ -36,10 +36,29 @@ $ transfer test.txt
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
- grunt serve
|
```
|
||||||
- grunt build
|
npm install
|
||||||
|
bower install
|
||||||
|
|
||||||
- sh transfer-server/run.sh
|
go get github.com/PuerkitoBio/ghost/handlers
|
||||||
|
go get github.com/gorilla/mux
|
||||||
|
go get github.com/dutchcoders/go-clamd
|
||||||
|
go get github.com/goamz/goamz/s3
|
||||||
|
go get github.com/goamz/goamz/aws
|
||||||
|
go get github.com/golang/gddo/httputil/header
|
||||||
|
go get github.com/kennygrant/sanitize
|
||||||
|
|
||||||
|
grunt serve
|
||||||
|
grunt build
|
||||||
|
|
||||||
|
sh transfer-server/run.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
```
|
||||||
|
go build -o transfersh-server *.go
|
||||||
|
```
|
||||||
|
|
||||||
## Contributions
|
## Contributions
|
||||||
|
|
||||||
|
@ -55,4 +74,5 @@ Contributions are welcome.
|
||||||
|
|
||||||
## Copyright and license
|
## Copyright and license
|
||||||
|
|
||||||
Code and documentation copyright 2011-2014 Remco Verhoef. Code released under [the MIT license](LICENSE).
|
Code and documentation copyright 2011-2014 Remco Verhoef.
|
||||||
|
Code released under [the MIT license](LICENSE).
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap": "~3.0.0",
|
"bootstrap": "~3.0.0",
|
||||||
"modernizr": "~2.6.2",
|
"modernizr": "~2.6.2",
|
||||||
|
"uri.js": "~1.14.1",
|
||||||
"typed.js": "https://github.com/mattboldt/typed.js.git"
|
"typed.js": "https://github.com/mattboldt/typed.js.git"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,26 @@
|
||||||
|
/*
|
||||||
|
https://github.com/fs111/kurz.go/blob/master/src/codec.go
|
||||||
|
|
||||||
|
Copyright (c) 2011 André Kelpe
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -102,6 +102,7 @@ func viewHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func notFoundHandler(w http.ResponseWriter, r *http.Request) {
|
func notFoundHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
http.Error(w, http.StatusText(404), 404)
|
||||||
}
|
}
|
||||||
|
|
||||||
func postHandler(w http.ResponseWriter, r *http.Request) {
|
func postHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
|
@ -69,6 +69,7 @@ func main() {
|
||||||
r.PathPrefix("/images/").Handler(http.FileServer(http.Dir("./static/")))
|
r.PathPrefix("/images/").Handler(http.FileServer(http.Dir("./static/")))
|
||||||
r.PathPrefix("/fonts/").Handler(http.FileServer(http.Dir("./static/")))
|
r.PathPrefix("/fonts/").Handler(http.FileServer(http.Dir("./static/")))
|
||||||
r.PathPrefix("/ico/").Handler(http.FileServer(http.Dir("./static/")))
|
r.PathPrefix("/ico/").Handler(http.FileServer(http.Dir("./static/")))
|
||||||
|
r.PathPrefix("/favicon.ico").Handler(http.FileServer(http.Dir("./static/")))
|
||||||
r.PathPrefix("/robots.txt").Handler(http.FileServer(http.Dir("./static/")))
|
r.PathPrefix("/robots.txt").Handler(http.FileServer(http.Dir("./static/")))
|
||||||
|
|
||||||
r.HandleFunc("/({files:.*}).zip", zipHandler).Methods("GET")
|
r.HandleFunc("/({files:.*}).zip", zipHandler).Methods("GET")
|
||||||
|
@ -103,7 +104,7 @@ func main() {
|
||||||
r.HandleFunc("/{filename}", putHandler).Methods("PUT")
|
r.HandleFunc("/{filename}", putHandler).Methods("PUT")
|
||||||
r.HandleFunc("/health.html", healthHandler).Methods("GET")
|
r.HandleFunc("/health.html", healthHandler).Methods("GET")
|
||||||
r.HandleFunc("/", postHandler).Methods("POST")
|
r.HandleFunc("/", postHandler).Methods("POST")
|
||||||
r.HandleFunc("/{page}", viewHandler).Methods("GET")
|
// r.HandleFunc("/{page}", viewHandler).Methods("GET")
|
||||||
r.HandleFunc("/", viewHandler).Methods("GET")
|
r.HandleFunc("/", viewHandler).Methods("GET")
|
||||||
|
|
||||||
r.NotFoundHandler = http.HandlerFunc(notFoundHandler)
|
r.NotFoundHandler = http.HandlerFunc(notFoundHandler)
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
|
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
|
||||||
<link rel="stylesheet" href="styles/main.css">
|
<link rel="stylesheet" href="styles/main.css">
|
||||||
|
|
||||||
<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300" rel="stylesheet" type="text/css">
|
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300" rel="stylesheet" type="text/css">
|
||||||
<link href="http://fonts.googleapis.com/css?family=Source+Code+Pro:300" rel="stylesheet" type="text/css">
|
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:300" rel="stylesheet" type="text/css">
|
||||||
|
|
||||||
<script src="scripts/vendor/modernizr.js"></script>
|
<script src="scripts/vendor/modernizr.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
@ -130,17 +130,24 @@
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h3>Uploading</h3>
|
<h3>Uploading</h3>
|
||||||
<h4>Uploading is easy using curl.</h4>
|
<h4>Uploading is easy using curl.</h4>
|
||||||
<code>curl --upload-file ./hello.txt https://transfer.sh/hello.txt</code>
|
<code>$ curl --upload-file ./hello.txt https://transfer.sh/hello.txt</code>
|
||||||
<h4>Download the file.</h4>
|
<h4>Download the file.</h4>
|
||||||
<code>curl --upload-file ./hello.txt https://transfer.sh/hello.txt</code>
|
<code>$ curl --upload-file ./hello.txt https://transfer.sh/hello.txt</code>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h3>Make an alias</h3>
|
<h3>Make an alias</h3>
|
||||||
<h4>Create an alias, and add it to .bashrc for faster use</h4>
|
<h4>Create an alias, and add it to .bashrc for faster use</h4>
|
||||||
<code>transfer() { curl --upload-file $1 https://transfer.sh/$(basename $1); }<br>
|
<code>$ transfer() {
|
||||||
|
# write to output to tmpfile because of progress bar
|
||||||
|
tmpfile=$( mktemp -t transfer )
|
||||||
|
curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile;
|
||||||
|
cat $tmpfile;
|
||||||
|
rm -f $tmpfile;
|
||||||
|
}
|
||||||
|
|
||||||
alias transfer=transfer</code>
|
alias transfer=transfer</code>
|
||||||
<h4>Now you can just use <strong>transfer</strong> command</h4>
|
<h4>Now you can just use <strong>transfer</strong> command</h4>
|
||||||
<code>transfer hello.txt</code>
|
<code>$transfer hello.txt</code>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -149,22 +156,21 @@ alias transfer=transfer</code>
|
||||||
<h3>Transfer multiple files</h3>
|
<h3>Transfer multiple files</h3>
|
||||||
<h4>Upload multiple files at once
|
<h4>Upload multiple files at once
|
||||||
</h4>
|
</h4>
|
||||||
<code>curl -i -F filedata=@/tmp/hello.txt -F filedata=@/tmp/hello2.txt https://transfer.sh/</code>
|
<code>$ curl -i -F filedata=@/tmp/hello.txt -F filedata=@/tmp/hello2.txt https://transfer.sh/</code>
|
||||||
<h4>Combining downloads as zip or tar archive</h4>
|
<h4>Combining downloads as zip or tar archive</h4>
|
||||||
<code>curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).tar.gz</code>
|
<code>$ curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).tar.gz</code>
|
||||||
<br>
|
<br>
|
||||||
<code>curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).zip</code>
|
<code>$ curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).zip</code>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h3>Encrypt your files before the transfer</h3>
|
<h3>Encrypt your files before the transfer</h3>
|
||||||
<h4>You can encrypt files using gpg. The following command will encrypt the data before it leaves your server using the password you enter and upload it to transfer.sh.</h4>
|
<h4>You can encrypt files using gpg. The following command will encrypt the data before it leaves your server using the password you enter and upload it to transfer.sh.</h4>
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
<code>cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt</code>
|
<code>$ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt</code>
|
||||||
<h4>Encrypt and upload</h4>
|
<h4>Encrypt and upload</h4>
|
||||||
<code>curl https://transfer.sh/1lDau/test.txt|gpg -o- > /tmp/hello.txt</code>
|
<code>$ curl https://transfer.sh/1lDau/test.txt|gpg -o- > /tmp/hello.txt</code>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,194 +0,0 @@
|
||||||
<!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]-->
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<title>transfer.sh</title>
|
|
||||||
<meta name="description" content="">
|
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
||||||
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
|
|
||||||
<link rel="stylesheet" href="styles/d4845602.main.css">
|
|
||||||
|
|
||||||
<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300" rel="stylesheet" type="text/css">
|
|
||||||
<link href="http://fonts.googleapis.com/css?family=Source+Code+Pro:300" rel="stylesheet" type="text/css">
|
|
||||||
|
|
||||||
<script src="/scripts/vendor/d7100892.modernizr.js"></script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="navigation">
|
|
||||||
<div class="wrapper">
|
|
||||||
<h1>transfer.sh</h1>
|
|
||||||
<ul>
|
|
||||||
<li><a href="#how-it-works">how to use</a>
|
|
||||||
</li>
|
|
||||||
<li><a href="#contact">contact us</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a href="https://github.com/you">
|
|
||||||
<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>
|
|
||||||
<section id="home">
|
|
||||||
<div class="wrapper">
|
|
||||||
<h2>
|
|
||||||
Upload and share your files
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div id="from-terminal" class="box">
|
|
||||||
<h3>From terminal</h3>
|
|
||||||
<div id="terminal">
|
|
||||||
<p style="white-space:pre"></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="from-web" class="">
|
|
||||||
<h3>From web</h3>
|
|
||||||
|
|
||||||
<form action="/file-upload" class="dropzone">
|
|
||||||
<div class="fallback">
|
|
||||||
<input name="file" type="file" multiple="multiple">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<a href="#how-it-works" class="btn-cta">learn more </a>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="features">
|
|
||||||
<div class="wrapper">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-3 col-xs-3">
|
|
||||||
<i class="fa fa-leaf"></i>
|
|
||||||
<h3>For Free</h3>
|
|
||||||
<p></p>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3 col-xs-3">
|
|
||||||
<i class="fa fa-leaf"></i>
|
|
||||||
<h3>A headline</h3>
|
|
||||||
<p></p>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3 col-xs-3">
|
|
||||||
<i class="fa fa-leaf"></i>
|
|
||||||
<h3>A headline</h3>
|
|
||||||
<p></p>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3 col-xs-3">
|
|
||||||
<i class="fa fa-leaf"></i>
|
|
||||||
<h3>A headline</h3>
|
|
||||||
<p></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="how-it-works">
|
|
||||||
<div class="wrapper">
|
|
||||||
<h2>How it works?</h2>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6">
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
|
|
||||||
<h3></h3>
|
|
||||||
<p></p>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
|
|
||||||
<h3></h3>
|
|
||||||
<p></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="why-use-it">
|
|
||||||
<div class="wrapper">
|
|
||||||
<h2>
|
|
||||||
Why use it?
|
|
||||||
</h2>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6">Terminal</div>
|
|
||||||
<div class="col-md-6">Web</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="share">
|
|
||||||
<div class="wrapper">
|
|
||||||
<h2>
|
|
||||||
Share the love
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<i class="fa fa-twitter"></i>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<i class="fa fa-facebook"></i>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<i class="fa fa-google-plus"></i>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<i class="fa fa-linkedin"></i>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="contact">
|
|
||||||
<div class="wrapper">
|
|
||||||
<i class="fa-envelope fa"></i>
|
|
||||||
<h2>
|
|
||||||
Any questions?
|
|
||||||
</h2>
|
|
||||||
<a href="#" class="btn-cta">contact us</a>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<p>Made with <i class="fa fa-heart"></i> by <a href="#">Dutch Coders</a>
|
|
||||||
</p>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<!--[if lt IE 7]>
|
|
||||||
<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>
|
|
||||||
<![endif]-->
|
|
||||||
|
|
||||||
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
|
|
||||||
<script>
|
|
||||||
(function (b, o, i, l, e, r) {
|
|
||||||
b.GoogleAnalyticsObject = l;
|
|
||||||
b[l] || (b[l] =
|
|
||||||
function () {
|
|
||||||
(b[l].q = b[l].q || []).push(arguments)
|
|
||||||
});
|
|
||||||
b[l].l = +new Date;
|
|
||||||
e = o.createElement(i);
|
|
||||||
r = o.getElementsByTagName(i)[0];
|
|
||||||
e.src = '//www.google-analytics.com/analytics.js';
|
|
||||||
r.parentNode.insertBefore(e, r)
|
|
||||||
}(window, document, 'script', 'ga'));
|
|
||||||
ga('create', 'UA-XXXXX-X');
|
|
||||||
ga('send', 'pageview');
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script src="/scripts/9d4218ba.main.js"></script>
|
|
||||||
|
|
||||||
<script src="/scripts/vendor/c6b52431.bootstrap.js"></script>
|
|
||||||
|
|
||||||
</html>
|
|
|
@ -1,309 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Command-line and web file sharing - transfer.sh</title>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<meta name="keywords" content="large files, share, quick, email, attachment, temporarily, now, curl, upload, download, command-line, file, secure, encrypted, gpg, fast.">
|
|
||||||
<meta name="description" content="Command-line and web file sharing.">
|
|
||||||
<meta name="author" content="DutchCoders">
|
|
||||||
<link href="css/bootstrap.css" media="all" rel="stylesheet" type="text/css" />
|
|
||||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" media="all" rel="stylesheet" type="text/css" />
|
|
||||||
<link href="css/style.css" rel="stylesheet">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<script>
|
|
||||||
(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', 'UA-40833733-1', 'transfer.sh');
|
|
||||||
ga('send', 'pageview');
|
|
||||||
</script>
|
|
||||||
<div id="fb-root"></div>
|
|
||||||
<script>(function(d, s, id) {
|
|
||||||
var js, fjs = d.getElementsByTagName(s)[0];
|
|
||||||
if (d.getElementById(id)) return;
|
|
||||||
js = d.createElement(s); js.id = id;
|
|
||||||
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=458220604296578&version=v2.0";
|
|
||||||
fjs.parentNode.insertBefore(js, fjs);
|
|
||||||
}(document, 'script', 'facebook-jssdk'));</script>
|
|
||||||
<div class="navbar-wrapper" >
|
|
||||||
<div class="navbar navbar-fixed-top" id="navigation">
|
|
||||||
<div class="navbar-inner">
|
|
||||||
<div class="container">
|
|
||||||
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
</button>
|
|
||||||
<a class="brand" href="/"><h2>transfer.sh</h2> </a>
|
|
||||||
<div class="nav-collapse collapse">
|
|
||||||
<ul class="nav pull-right">
|
|
||||||
<li class="active">
|
|
||||||
<a href="#top">Home</a>
|
|
||||||
</li>
|
|
||||||
<li class="">
|
|
||||||
<a href="#features">Features</a>
|
|
||||||
</li>
|
|
||||||
<li class="">
|
|
||||||
<a href="#support">Use cases</a>
|
|
||||||
</li>
|
|
||||||
<li class="">
|
|
||||||
<a href="#testimonials">Samples</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="wrap">
|
|
||||||
<header id="top">
|
|
||||||
<div class="container ">
|
|
||||||
<div class="row home">
|
|
||||||
<div class="span6">
|
|
||||||
|
|
||||||
<h1>Share your files</h1>
|
|
||||||
<p>Files dropped to this page will be uploaded to our storage and you will get a link, which you can share.</p>
|
|
||||||
<p>Each file can be downloaded individually, but you will also retrieve a url for downloading a zip or tar file with all files.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="span5" id="main-media">
|
|
||||||
<div class='span5 well' style='color: #000;'>
|
|
||||||
|
|
||||||
<div class='span4' ><h2>Quick Upload</h2>
|
|
||||||
<p>Drag your files to the page to share them, you'll get a link in return. Or click <a class="browse" href="#">here</a> to browse for files.</p>
|
|
||||||
<input type="file" multiple="multiple" style='display: none;' />
|
|
||||||
<ul class='queue' style='color: black; list-style-type: none; margin: 0;'>
|
|
||||||
<li>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<div class='span8 all-files' style='margin: 0; opacity: 0;'>
|
|
||||||
download all files link <a class="download-zip" href="#">zip</a> <a class="download-tar" href="#">tar.gz</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</header>
|
|
||||||
<hr class="line">
|
|
||||||
<div class="container">
|
|
||||||
<section id="features">
|
|
||||||
<div class="row">
|
|
||||||
<div class="span6">
|
|
||||||
<h1>Command-line file sharing</h1>
|
|
||||||
<p>Now you can just upload and download files without complexity from your shell or browser. Just upload the file using by dropping it to this page, curl or any other command using PUT or POST to our server. We'll return a shareable url, which will expire within 2 weeks.</p>
|
|
||||||
</div>
|
|
||||||
<div class="span6">
|
|
||||||
<img style='float:right;' src="/img/demo.gif">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row margintop20">
|
|
||||||
<div class="span4">
|
|
||||||
<h2><i class="icon-briefcase"></i> Shell upload</h2>
|
|
||||||
<p>Upload files or pipe data from the shell. Every application that uses HTTP PUT or POST can be used to upload files.</p>
|
|
||||||
</div><!-- /span4 -->
|
|
||||||
<div class="span4">
|
|
||||||
<h2><i class="icon-bar-chart"></i> Share</h2>
|
|
||||||
<p>Files can be shared by just sharing the url.</p>
|
|
||||||
</div><!-- /span4 -->
|
|
||||||
<div class="span4">
|
|
||||||
<h2><i class="icon-bullhorn"></i> Why?</h2>
|
|
||||||
<ul>
|
|
||||||
<li>you can upload large files (max 5gb)</li>
|
|
||||||
<li>it is completely free</li>
|
|
||||||
<li>uploading and download is fast</li>
|
|
||||||
<li>easy to do</li>
|
|
||||||
</ul>
|
|
||||||
</div><!-- /span4 -->
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<hr class="line">
|
|
||||||
<section id="support">
|
|
||||||
<div class="row">
|
|
||||||
<div class="offset3 span6">
|
|
||||||
<h2>Use cases</h2>
|
|
||||||
<ul >
|
|
||||||
<li>Upload backup files, automated, and share them with your customer.</li>
|
|
||||||
<li>Drop your large email attachments to this page and replace them with the links.</li>
|
|
||||||
<li>Upload that zip file from your shell to transfer.sh and share the link.</li>
|
|
||||||
<li>Temporary location to upload files and download elsewhere.</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<hr class="line">
|
|
||||||
<section id="testimonials">
|
|
||||||
<div class="row center">
|
|
||||||
<h2> Samples </h2>
|
|
||||||
<div class="row margintop20">
|
|
||||||
<div class='span4' style='text-align: left;'>
|
|
||||||
<h3>Upload</h3>
|
|
||||||
<p>Uploading is easy using curl.</p>
|
|
||||||
<pre>
|
|
||||||
curl --upload-file ./hello.txt https://transfer.sh/hello.txt
|
|
||||||
</pre>
|
|
||||||
<p>Download the file</p>
|
|
||||||
<pre>curl https://transfer.sh/66nb8/hello.txt</pre>
|
|
||||||
<p>Create a share alias (add it to .bashrc or .zshrc):</p>
|
|
||||||
<pre>
|
|
||||||
transfer() {
|
|
||||||
# write to output to tmpfile because of progress bar
|
|
||||||
tmpfile=$( mktemp -t transfer )
|
|
||||||
curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile;
|
|
||||||
cat $tmpfile;
|
|
||||||
rm -f $tmpfile;
|
|
||||||
}
|
|
||||||
|
|
||||||
alias transfer=transfer
|
|
||||||
</pre>
|
|
||||||
<p>Now you can just use <b>transfer hello.txt</b> to upload the file!</p>
|
|
||||||
</div>
|
|
||||||
<div class='span4' style='text-align: left;'>
|
|
||||||
<h3>Upload multiple files at once</h3>
|
|
||||||
<pre>curl -i -F filedata=@/tmp/hello.txt -F filedata=@/tmp/hello2.txt https://transfer.sh/</pre>
|
|
||||||
<h3>Combining downloads as zip or tar archive</h3>
|
|
||||||
<pre>curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).tar.gz</pre>
|
|
||||||
<pre>curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).tar</pre>
|
|
||||||
<pre>curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).zip</pre>
|
|
||||||
<h3>Scan for malware or viruses using Clamav</h3>
|
|
||||||
<pre>
|
|
||||||
wget http://www.eicar.org/download/eicar.com
|
|
||||||
curl -X PUT --upload-file ./eicar.com https://transfer.sh/eicar.com/scan
|
|
||||||
</pre>
|
|
||||||
<h3>Upload malware to VirusTotal, get a permalink in return</h3>
|
|
||||||
<pre>
|
|
||||||
curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal
|
|
||||||
</pre>
|
|
||||||
<h3>Database backup</h3>
|
|
||||||
<pre>
|
|
||||||
mysqldump --all-databases | gzip | curl --upload-file - ttps://transfer.sh/dmp.sql.gz
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class='span4' style='text-align: left;'>
|
|
||||||
<h3>Secure transfer</h3>
|
|
||||||
<p>You can encrypt files using gpg. The following command will encrypt the data before it leaves your server using the password you enter and upload it to transfer.sh. </p>
|
|
||||||
<p><b>Encrypt & upload</b></p>
|
|
||||||
<pre>cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt</pre>
|
|
||||||
<p><b>Decrypt & download</b></p>
|
|
||||||
<pre>curl https://transfer.sh/1lDau/test.txt|gpg -o- > /tmp/hello.txt</pre>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<hr class="line">
|
|
||||||
<section id="news">
|
|
||||||
<div class="row center">
|
|
||||||
<div class="span12">
|
|
||||||
<h2>Updates</h2>
|
|
||||||
<div class="row margintop40">
|
|
||||||
<div class="span12">
|
|
||||||
<span style='font-weight: bold;'>2014-09-23: </span> Added support for gzip, added scan & virustotal functionality
|
|
||||||
</div>
|
|
||||||
<div class="span12">
|
|
||||||
<span style='font-weight: bold;'>2014-09-12: </span> Added Content-Disposition: Attachment header
|
|
||||||
</div>
|
|
||||||
<div class="span12">
|
|
||||||
<span style='font-weight: bold;'>2014-09-10: </span> Added support to download multiple files
|
|
||||||
</div>
|
|
||||||
<div class="span12">
|
|
||||||
<span style='font-weight: bold;'>2014-09-10: </span> SSL support added
|
|
||||||
</div>
|
|
||||||
<div class="span12">
|
|
||||||
<span style='font-weight: bold;'>2014-09-06: </span> Improved upload speed, support for uploads without content length (eg. piped data)
|
|
||||||
</div>
|
|
||||||
<div class="span12">
|
|
||||||
<span style='font-weight: bold;'>2014-09-06: </span> Support for uploading files using POST.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<hr class="line">
|
|
||||||
</div>
|
|
||||||
<div id="push"></div>
|
|
||||||
</div>
|
|
||||||
<footer id="footer" class="margintop20">
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="span4">
|
|
||||||
<h2>about us...</h2>
|
|
||||||
<p>This service has been developed because of our own need. We're just glad if we can help you with the service also. Please let us know if you've got any suggestions or comments using the Feedback & Support tab.</p>
|
|
||||||
<p class="copyright">
|
|
||||||
<a style='margin-top: 4px;' class="twitter-follow-button"
|
|
||||||
href="https://twitter.com/dutchcoders"
|
|
||||||
data-show-count="false"
|
|
||||||
data-lang="en">
|
|
||||||
Follow @dutchcoders
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="span3">
|
|
||||||
<h2>social</h2>
|
|
||||||
<a href="https://twitter.com/share?counturl=https://transfer.sh/&related=dutchcoders" class="twitter-share-button">Tweet</a>
|
|
||||||
<br/>
|
|
||||||
<script src="//platform.linkedin.com/in.js" type="text/javascript">
|
|
||||||
lang: en_US
|
|
||||||
</script>
|
|
||||||
<script type="IN/Share" data-counter="right"></script>
|
|
||||||
<g:plus action="share" ...></g:plus>
|
|
||||||
<div class="fb-like" data-href="http://transfer.sh/" data-layout="standard" data-action="recommend" data-show-faces="true" data-share="true" data-colorscheme="dark"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="pull-right" style='margin-right: 40px;'>
|
|
||||||
<p>Made with ❤ by <a href="http://dutchcoders.io/">DutchCoders</a>.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
window.twttr = (function (d, s, id) {
|
|
||||||
var t, js, fjs = d.getElementsByTagName(s)[0];
|
|
||||||
if (d.getElementById(id)) return;
|
|
||||||
js = d.createElement(s); js.id = id;
|
|
||||||
js.src= "https://platform.twitter.com/widgets.js";
|
|
||||||
fjs.parentNode.insertBefore(js, fjs);
|
|
||||||
return window.twttr || (t = { _e: [], ready: function (f) { t._e.push(f) } });
|
|
||||||
}(document, "script", "twitter-wjs"));
|
|
||||||
</script>
|
|
||||||
</footer>
|
|
||||||
<div style='padding: 4px;'>
|
|
||||||
<span style='font-size: 0.8em;'>Powered by <a href="http://golang.org/">Go</a><img style="height: 24px;" src="/img/golang-mascot.png"/>
|
|
||||||
</div>
|
|
||||||
<script src="js/jquery.js"></script>
|
|
||||||
<script src="js/jquery.fitvids.js"></script>
|
|
||||||
<script src="js/jquery.easing.1.3.js"></script>
|
|
||||||
<script src="js/custom.js"></script>
|
|
||||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
(function() {
|
|
||||||
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
|
|
||||||
po.src = 'https://apis.google.com/js/plusone.js';
|
|
||||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
<!-- UserVoice JavaScript SDK (only needed once on a page) -->
|
|
||||||
<script>(function(){var uv=document.createElement('script');uv.type='text/javascript';uv.async=true;uv.src='//widget.uservoice.com/5rkATbLIm8ClJQeOirOhFg.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(uv,s)})()</script>
|
|
||||||
<!-- A tab to launch the Classic Widget -->
|
|
||||||
<script>
|
|
||||||
UserVoice = window.UserVoice || [];
|
|
||||||
UserVoice.push(['showTab', 'classic_widget', {
|
|
||||||
mode: 'full',
|
|
||||||
primary_color: '#cc6d00',
|
|
||||||
link_color: '#007dbf',
|
|
||||||
default_mode: 'support',
|
|
||||||
forum_id: 264773,
|
|
||||||
tab_label: 'Feedback & Support',
|
|
||||||
tab_color: '#cc6d00',
|
|
||||||
tab_position: 'middle-right',
|
|
||||||
tab_inverted: false
|
|
||||||
}]);
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,29 +0,0 @@
|
||||||
transfer.sh: Easy file sharing from the command line
|
|
||||||
===
|
|
||||||
made with <3 by DutchCoders
|
|
||||||
|
|
||||||
Upload:
|
|
||||||
$ curl --upload-file ./hello.txt https://transfer.sh/hello.txt
|
|
||||||
|
|
||||||
Encrypt & upload:
|
|
||||||
$ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt
|
|
||||||
|
|
||||||
Download & decrypt:
|
|
||||||
$ curl https://transfer.sh/1lDau/test.txt|gpg -o- > /tmp/hello.txt
|
|
||||||
|
|
||||||
Upload to virustotal:
|
|
||||||
$ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/virustotal
|
|
||||||
|
|
||||||
Add alias to .bashrc or .zshrc:
|
|
||||||
===
|
|
||||||
transfer() {
|
|
||||||
# write to output to tmpfile because of progress bar
|
|
||||||
tmpfile=$( mktemp -t transfer )
|
|
||||||
curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile;
|
|
||||||
cat $tmpfile;
|
|
||||||
rm -f $tmpfile;
|
|
||||||
}
|
|
||||||
|
|
||||||
alias transfer=transfer
|
|
||||||
===
|
|
||||||
$ transfer test.txt
|
|
|
@ -15,8 +15,8 @@
|
||||||
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
|
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
|
||||||
<link rel="stylesheet" href="styles/main.css">
|
<link rel="stylesheet" href="styles/main.css">
|
||||||
|
|
||||||
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300' rel='stylesheet' type='text/css'>
|
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:100,200,300' rel='stylesheet' type='text/css'>
|
||||||
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:300' rel='stylesheet' type='text/css'>
|
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:300' rel='stylesheet' type='text/css'>
|
||||||
|
|
||||||
<!-- build:js scripts/vendor/modernizr.js -->
|
<!-- build:js scripts/vendor/modernizr.js -->
|
||||||
<script src="bower_components/modernizr/modernizr.js"></script>
|
<script src="bower_components/modernizr/modernizr.js"></script>
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 col-xs-6">
|
<div class="col-md-6 col-xs-6">
|
||||||
|
|
||||||
<meta name="twitter:widgets:link-color" content="#cc0000">
|
<meta name="twitter:widgets:link-color" content="#cc0000">
|
||||||
<blockquote class="twitter-tweet" lang="en">
|
<blockquote class="twitter-tweet" lang="en">
|
||||||
<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>— Dave Sims (@FloifyDave) <a href="https://twitter.com/FloifyDave/status/517383101425516544">October 1, 2014</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>— Dave Sims (@FloifyDave) <a href="https://twitter.com/FloifyDave/status/517383101425516544">October 1, 2014</a>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
@ -171,38 +171,45 @@
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h3>Uploading</h3>
|
<h3>Uploading</h3>
|
||||||
<h4>Uploading is easy using curl.</h4>
|
<h4>Uploading is easy using curl.</h4>
|
||||||
<code>curl --upload-file ./hello.txt https://transfer.sh/hello.txt</code>
|
<code>$ curl --upload-file ./hello.txt https://transfer.sh/hello.txt</code>
|
||||||
<h4>Download the file.</h4>
|
<h4>Download the file.</h4>
|
||||||
<code>curl --upload-file ./hello.txt https://transfer.sh/hello.txt</code>
|
<code>$ curl --upload-file ./hello.txt https://transfer.sh/hello.txt</code>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h3>Make an alias</h3>
|
<h3>Make an alias</h3>
|
||||||
|
|
||||||
<h4>Create an alias, and add it to .bashrc for faster use</h4>
|
<h4>Create an alias, and add it to .bashrc for faster use</h4>
|
||||||
<code>transfer() { curl --upload-file $1 https://transfer.sh/$(basename $1); }
|
<code>$ transfer() { # write to output to tmpfile because of progress bar tmpfile=$( mktemp -t transfer ) curl --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile; cat $tmpfile; rm -f $tmpfile; } alias transfer=transfer</code>
|
||||||
<br>alias transfer=transfer</code>
|
|
||||||
<h4>Now you can just use
|
<h4>Now you can just use
|
||||||
<strong>transfer</strong>command</h4>
|
<strong>transfer</strong>command</h4>
|
||||||
<code>transfer hello.txt</code>
|
<code>$transfer hello.txt</code>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h3>Transfer multiple files</h3>
|
<h3>Transfer multiple files</h3>
|
||||||
<h4>Upload multiple files at once
|
<h4>Upload multiple files at once
|
||||||
|
|
||||||
</h4>
|
</h4>
|
||||||
<code>curl -i -F filedata=@/tmp/hello.txt -F filedata=@/tmp/hello2.txt https://transfer.sh/</code>
|
<code>$ curl -i -F filedata=@/tmp/hello.txt -F filedata=@/tmp/hello2.txt https://transfer.sh/</code>
|
||||||
|
|
||||||
<h4>Combining downloads as zip or tar archive</h4>
|
<h4>Combining downloads as zip or tar archive</h4>
|
||||||
<code>curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).tar.gz</code>
|
<code>$ curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).tar.gz</code>
|
||||||
<br>
|
<br>
|
||||||
<code>curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).zip</code>
|
|
||||||
|
<code>$ curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).zip</code>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h3>Encrypt your files before the transfer</h3>
|
<h3>Encrypt your files before the transfer</h3>
|
||||||
<h4>You can encrypt files using gpg. The following command will encrypt the data before it leaves your server using the password you enter and upload it to transfer.sh.</h4>
|
<h4>You can encrypt files using gpg. The following command will encrypt the data before it leaves your server using the password you enter and upload it to transfer.sh.</h4>
|
||||||
<h4></h4>
|
<h4></h4>
|
||||||
<code>cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt</code>
|
<code>$ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt</code>
|
||||||
<h4>Encrypt and upload</h4>
|
<h4>Encrypt and upload</h4>
|
||||||
<code>curl https://transfer.sh/1lDau/test.txt|gpg -o- > /tmp/hello.txt</code>
|
<code>$ curl https://transfer.sh/1lDau/test.txt|gpg -o- > /tmp/hello.txt</code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -288,6 +295,7 @@
|
||||||
<!-- build:js scripts/main.js -->
|
<!-- build:js scripts/main.js -->
|
||||||
<script src="bower_components/jquery/dist/jquery.js"></script>
|
<script src="bower_components/jquery/dist/jquery.js"></script>
|
||||||
<script src="bower_components/typed.js/js/typed.js"></script>
|
<script src="bower_components/typed.js/js/typed.js"></script>
|
||||||
|
<script src="bower_components/uri.js/src/URI.min.js"></script>
|
||||||
<script src="scripts/main.js"></script>
|
<script src="scripts/main.js"></script>
|
||||||
<!-- endbuild -->
|
<!-- endbuild -->
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -52,14 +52,13 @@ $(document).ready(function () {
|
||||||
|
|
||||||
// progress.className = (xhr.status == 200 ? "success" : "failure");
|
// progress.className = (xhr.status == 200 ? "success" : "failure");
|
||||||
if (xhr.status == 200) {
|
if (xhr.status == 200) {
|
||||||
$(li).html('<i class="icon-file fileupload-exists"></i><a target="_blank" href="' + xhr.responseText + '">' + xhr.responseText + '</a>');
|
$(li).html('<a target="_blank" href="' + xhr.responseText + '">' + xhr.responseText + '</a>');
|
||||||
} else {
|
} else {
|
||||||
$(li).html('Error (' + xhr.status + ') during upload of file ' + file.name + '.');
|
$(li).html('<span>Error (' + xhr.status + ') during upload of file ' + file.name + '</span>');
|
||||||
}
|
}
|
||||||
|
|
||||||
files.push(xhr.responseText.replace("https://transfer.sh/", ""));
|
files.push(xhr.responseText.replace("https://transfer.sh/", "").replace("\n", ""));
|
||||||
|
// files.push(URI(xhr.responseText).absoluteTo(location.href).toString());
|
||||||
files.push(URI(xhr.responseText).absoluteTo(location.href).toString());
|
|
||||||
|
|
||||||
$(".download-zip").attr("href", URI("(" + files.join(",") + ").zip").absoluteTo(location.href).toString());
|
$(".download-zip").attr("href", URI("(" + files.join(",") + ").zip").absoluteTo(location.href).toString());
|
||||||
$(".download-tar").attr("href", URI("(" + files.join(",") + ").tar.gz").absoluteTo(location.href).toString());
|
$(".download-tar").attr("href", URI("(" + files.join(",") + ").tar.gz").absoluteTo(location.href).toString());
|
||||||
|
|
Loading…
Reference in a new issue