mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-23 12:40:19 +01:00
Merge pull request #12 from neydroid/pull-request-fix-download-file
fixed example of downloading file command
This commit is contained in:
commit
7292bfac25
1 changed files with 11 additions and 11 deletions
|
@ -54,7 +54,7 @@ include "includes/head.html"
|
|||
<br>
|
||||
<span class="code-title"># Upload from web</span>
|
||||
<br>Drag your files here, or <a class="browse" href="#"> click to browse. <br/></a>
|
||||
|
||||
|
||||
</code>
|
||||
<input type="file" multiple="multiple" style='display: none;' />
|
||||
<ul class='queue'>
|
||||
|
@ -131,10 +131,10 @@ include "includes/head.html"
|
|||
<code>
|
||||
<span class="code-title"># Uploading is easy using curl</span>
|
||||
<br>$ curl --upload-file ./hello.txt https://transfer.sh/hello.txt
|
||||
<br>
|
||||
<br>https://transfer.sh/66nb8/hello.txt
|
||||
<br>
|
||||
<span class="code-title"># Download the file</span>
|
||||
<br>$ curl --upload-file ./hello.txt https://transfer.sh/hello.txt
|
||||
<br>$ curl https://transfer.sh/66nb8/hello.txt -o hello.txt
|
||||
</code>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -152,20 +152,20 @@ include "includes/head.html"
|
|||
<br/> echo "$ cat /tmp/test.md | transfer test.md"
|
||||
<br/> return 1
|
||||
<br/> fi
|
||||
<br/>
|
||||
<br/>
|
||||
<br/> # write to output to tmpfile because of progress bar
|
||||
<br/> tmpfile=$( mktemp -t transferXXX );
|
||||
<br/>
|
||||
<br/>
|
||||
<br/> if tty -s; then
|
||||
<br/> basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g');
|
||||
<br/> curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile;
|
||||
<br/> else
|
||||
<br/> curl --progress-bar --upload-file "-" "https://transfer.sh/$1"
|
||||
<br/> fi
|
||||
<br/>
|
||||
<br/>
|
||||
<br/> cat $tmpfile; rm -f $tmpfile;
|
||||
<br/>}
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>alias transfer=transfer
|
||||
<br/>
|
||||
<br/>
|
||||
|
@ -357,14 +357,14 @@ include "includes/head.html"
|
|||
<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 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="https://plus.google.com/share?url=http%3A%2F%2Ftransfer.sh" target="_blank" title="Share on Google+" onclick="window.open('https://plus.google.com/share?url=' + encodeURIComponent(document.URL)); return false;"> <i class="icon-gplus"></i>
|
||||
<a href="https://plus.google.com/share?url=http%3A%2F%2Ftransfer.sh" target="_blank" title="Share on Google+" onclick="window.open('https://plus.google.com/share?url=' + encodeURIComponent(document.URL)); return false;"> <i class="icon-gplus"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -395,13 +395,13 @@ include "includes/head.html"
|
|||
</section>
|
||||
|
||||
|
||||
include "includes/footer.html"
|
||||
include "includes/footer.html"
|
||||
|
||||
include "includes/js.html"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
|
|
Loading…
Reference in a new issue