通过函数上传文件
#定义上传文件函数
upload_file() {
local filename="$1"
shift
curl https://s.qaer.cn/upload \
--progress-bar \
-H "X-Filename: $(basename $filename)" \
-T "$filename" \
"$@" | cat
}
upload_file [filename]
直接上传文件
echo [filePath] | xargs -i curl -F "file=@{}" https://s.qaer.cn/upload
下载文件
wget https://s.qaer.cn/download/[year]/[month]/[file_name] -O [filePath]
通过函数上传文件
#定义上传文件函数
upload_file() {
local filename="$1"
shift
curl https://s.qaer.cn/upload \
--progress-bar \
-H "X-Filename: $(basename $filename)" \
-T "$filename" \
"$@" | cat
}
upload_file [filename]
直接上传文件
echo [filePath] | xargs -I {} curl -F "file=@{}" https://s.qaer.cn/upload
下载文件
wget https://s.qaer.cn/download/[year]/[month]/[file_name] -O [filePath]
文件上传 (PowerShell)
Invoke-WebRequest -Uri https://s.qaer.cn/upload -Method Post -InFile [filePath]
文件下载 (PowerShell)
Invoke-WebRequest -Uri https://s.qaer.cn/download/[year]/[month]/[file_name] -OutFile [filePath]