transfer.sh 是一个在线工具,使用它可以在命令行直接用 curl 上传和下载文件(文件分享)。分享的音频、视频等文件可直接在网页预览。

transfer.sh 开源于 Gitlab,提供了全平台的可部署文件,您可以直接下载部署为自己的服务。

使用说明

使用 cURL 上传文件:

$ curl --upload-file ./hello.txt https://transfer.sh/hello.txt 
https://transfer.sh/9I7lp2/hello.txt

下载文件:

 $ curl https://transfer.sh/9I7lp2/hello.txt -o hello.txt

设置下载次数限制和最大保存时间:

$ curl -H "Max-Downloads: 1" -H "Max-Days: 5" --upload-file ./hello.txt 
https://transfer.sh/hello.txt https://transfer.sh/9I7lp2/hello.txt

分享文件的截图

QQ20220531-124012.png