diff --git a/transfersh-server/static/index.html b/transfersh-server/static/index.html index 7e556dd..208c41f 100644 --- a/transfersh-server/static/index.html +++ b/transfersh-server/static/index.html @@ -173,7 +173,9 @@ # Add this to .bashrc or its equivalent
transfer() {
# write to output to tmpfile because of progress bar -
tmpfile=$( mktemp -t transferXXX ); basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9.-_]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; cat $tmpfile; rm -f $tmpfile; +
tmpfile=$( mktemp -t transferXXX ); basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g') +
curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile +
cat $tmpfile; rm -f $tmpfile;
}

alias transfer=transfer diff --git a/transfersh-server/static/index.txt b/transfersh-server/static/index.txt index eaafee8..7e0465c 100644 --- a/transfersh-server/static/index.txt +++ b/transfersh-server/static/index.txt @@ -18,10 +18,10 @@ 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; + tmpfile=$( mktemp -t transferXXX ); + basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); + curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; + cat $tmpfile; rm -f $tmpfile; } alias transfer=transfer diff --git a/transfersh-web/index.html b/transfersh-web/index.html index bb763e7..92f836e 100644 --- a/transfersh-web/index.html +++ b/transfersh-web/index.html @@ -147,7 +147,9 @@ include "includes/head.html" # Add this to .bashrc or its equivalent
transfer() {
# write to output to tmpfile because of progress bar -
tmpfile=$( mktemp -t transferXXX ); basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9.-_]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; cat $tmpfile; rm -f $tmpfile; +
tmpfile=$( mktemp -t transferXXX ); basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g') +
curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile +
cat $tmpfile; rm -f $tmpfile;
}

alias transfer=transfer diff --git a/transfersh-web/index.txt b/transfersh-web/index.txt index eaafee8..c8a16b7 100644 --- a/transfersh-web/index.txt +++ b/transfersh-web/index.txt @@ -14,14 +14,17 @@ $ 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 +Virusscan: +$ curl -X PUT --upload-file nhgbhhj https://transfer.sh/test.txt/scan + 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; + tmpfile=$( mktemp -t transferXXX ); + basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); + curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; + cat $tmpfile; rm -f $tmpfile; } alias transfer=transfer