Browse Source

Fix the bash functions to handle files with spaces

tags/v1.1.0
Stuart Powers 5 years ago
parent
commit
75ea4c8d5f
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      README.md

+ 4
- 2
README.md View File

@@ -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…
Cancel
Save