Linux command
transfersh 命令
网络
需要网络或远程资源。
常用示例
Upload file
curl --upload-file [file.txt] https://transfer.sh/[filename]
Upload with max downloads
curl --upload-file [file.txt] -H "Max-Downloads: [1]" https://transfer.sh/
Upload with expiry
curl --upload-file [file.txt] -H "Max-Days: [7]" https://transfer.sh/
Delete upload
curl -X DELETE [delete-url]
Encrypt upload
cat [file] | gpg -c | curl --upload-file - https://transfer.sh/[file.gpg]
说明
transfer.sh is a file sharing service designed for easy command-line use. Files are uploaded via standard HTTP PUT requests using curl, and the service returns a unique download URL that can be shared with others. No account or registration is required for basic uploads. Uploads can be configured with expiration times and download limits through HTTP headers, giving control over how long files remain available and how many times they can be downloaded. Files are automatically deleted after the specified expiration period. The service also supports encryption by piping files through GPG before uploading. Transfer.sh can be self-hosted as an open-source Go application or used through the public instance at transfer.sh. It supports uploads up to several gigabytes and provides delete URLs for manual removal of uploaded files.
参数
- --upload-file
- File to upload.
- Max-Downloads: _N_
- Download limit.
- Max-Days: _N_
- Days until expiry.
- -X DELETE
- Delete file.
FAQ
What is the transfersh command used for?
transfer.sh is a file sharing service designed for easy command-line use. Files are uploaded via standard HTTP PUT requests using curl, and the service returns a unique download URL that can be shared with others. No account or registration is required for basic uploads. Uploads can be configured with expiration times and download limits through HTTP headers, giving control over how long files remain available and how many times they can be downloaded. Files are automatically deleted after the specified expiration period. The service also supports encryption by piping files through GPG before uploading. Transfer.sh can be self-hosted as an open-source Go application or used through the public instance at transfer.sh. It supports uploads up to several gigabytes and provides delete URLs for manual removal of uploaded files.
How do I run a basic transfersh example?
Run `curl --upload-file [file.txt] https://transfer.sh/[filename]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --upload-file do in transfersh?
File to upload.