瀏覽代碼

Merge pull request #227 from sente/master

Fix the bash functions to handle files with spaces
tags/v1.1.0
Andrea Spacca 5 年之前
committed by GitHub
父節點
當前提交
464fc37d68
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 4 行新增2 行删除
  1. +4
    -2
      README.md

+ 4
- 2
README.md 查看文件

@@ -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…
取消
儲存