Merge pull request #227 from sente/master
Fix the bash functions to handle files with spaces
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user