mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2020-11-18 19:53:40 -08:00
fixed example of downloading file command
This commit is contained in:
parent
f60b0ef80c
commit
398f8e6531
@ -54,7 +54,7 @@ include "includes/head.html"
|
|||||||
<br>
|
<br>
|
||||||
<span class="code-title"># Upload from web</span>
|
<span class="code-title"># Upload from web</span>
|
||||||
<br>Drag your files here, or <a class="browse" href="#"> click to browse. <br/></a>
|
<br>Drag your files here, or <a class="browse" href="#"> click to browse. <br/></a>
|
||||||
|
|
||||||
</code>
|
</code>
|
||||||
<input type="file" multiple="multiple" style='display: none;' />
|
<input type="file" multiple="multiple" style='display: none;' />
|
||||||
<ul class='queue'>
|
<ul class='queue'>
|
||||||
@ -134,7 +134,7 @@ include "includes/head.html"
|
|||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<span class="code-title"># Download the file</span>
|
<span class="code-title"># Download the file</span>
|
||||||
<br>$ curl --upload-file ./hello.txt https://transfer.sh/hello.txt
|
<br>$ curl https://transfer.sh/hello.txt -o hello.txt
|
||||||
</code>
|
</code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -152,20 +152,20 @@ include "includes/head.html"
|
|||||||
<br/> echo "$ cat /tmp/test.md | transfer test.md"
|
<br/> echo "$ cat /tmp/test.md | transfer test.md"
|
||||||
<br/> return 1
|
<br/> return 1
|
||||||
<br/> fi
|
<br/> fi
|
||||||
<br/>
|
<br/>
|
||||||
<br/> # write to output to tmpfile because of progress bar
|
<br/> # write to output to tmpfile because of progress bar
|
||||||
<br/> tmpfile=$( mktemp -t transferXXX );
|
<br/> tmpfile=$( mktemp -t transferXXX );
|
||||||
<br/>
|
<br/>
|
||||||
<br/> if tty -s; then
|
<br/> if tty -s; then
|
||||||
<br/> basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g');
|
<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/> curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile;
|
||||||
<br/> else
|
<br/> else
|
||||||
<br/> curl --progress-bar --upload-file "-" "https://transfer.sh/$1"
|
<br/> curl --progress-bar --upload-file "-" "https://transfer.sh/$1"
|
||||||
<br/> fi
|
<br/> fi
|
||||||
<br/>
|
<br/>
|
||||||
<br/> cat $tmpfile; rm -f $tmpfile;
|
<br/> cat $tmpfile; rm -f $tmpfile;
|
||||||
<br/>}
|
<br/>}
|
||||||
<br/>
|
<br/>
|
||||||
<br/>alias transfer=transfer
|
<br/>alias transfer=transfer
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
@ -357,14 +357,14 @@ include "includes/head.html"
|
|||||||
<h2 class="page-title">Share the love</h2>
|
<h2 class="page-title">Share the love</h2>
|
||||||
<ul class="share-buttons">
|
<ul class="share-buttons">
|
||||||
<li>
|
<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>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<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>
|
<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>
|
||||||
<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>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
@ -395,13 +395,13 @@ include "includes/head.html"
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
include "includes/footer.html"
|
include "includes/footer.html"
|
||||||
|
|
||||||
include "includes/js.html"
|
include "includes/js.html"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user