mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-12-27 21:00:19 +01:00
Fix the bash functions to handle files with spaces
This commit is contained in:
parent
d16dc4298f
commit
75ea4c8d5f
1 changed files with 4 additions and 2 deletions
|
@ -63,7 +63,8 @@ X-Url-Delete: https://transfer.sh/hello.txt/BAYh0/hello.txt/PDw0NHPcqU
|
|||
### Using curl
|
||||
```bash
|
||||
transfer() {
|
||||
curl --progress-bar --upload-file "$1" https://transfer.sh/$(basename $1) | tee /dev/null;
|
||||
curl --progress-bar --upload-file "$1" https://transfer.sh/$(basename "$1") | tee /dev/null;
|
||||
echo
|
||||
}
|
||||
|
||||
alias transfer=transfer
|
||||
|
@ -72,7 +73,8 @@ alias transfer=transfer
|
|||
### Using wget
|
||||
```bash
|
||||
transfer() {
|
||||
wget -t 1 -qO - --method=PUT --body-file="$1" --header="Content-Type: $(file -b --mime-type $1)" https://transfer.sh/$(basename $1);
|
||||
wget -t 1 -qO - --method=PUT --body-file="$1" --header="Content-Type: $(file -b --mime-type "$1")" https://transfer.sh/$(basename "$1");
|
||||
echo
|
||||
}
|
||||
|
||||
alias transfer=transfer
|
||||
|
|
Loading…
Reference in a new issue