This is a simple command-line utility for uploading files to a specified server. It supports setting a maximum number of days to keep the file and a maximum number of downloads.
- Upload a file to a specified server
- Set maximum number of days to keep the file
- Set maximum number of downloads
- Displays upload progress
- Copies the download URL to the clipboard upon successful upload
- Go 1.16 or higher
- Environment variables for the server URL, HTTP authentication username, and password
-
Clone the repository:
git clone https://github.com/yourusername/file-upload-utility.git cd file-upload-utility -
Build the utility:
go build -o file-upload
-
Set the environment variables:
export TSH_URL="https://yourserver.com/upload" export TSH_HTTP_AUTH_USER="yourusername" export TSH_HTTP_AUTH_PASS="yourpassword"
-
Run the utility with the file you want to upload:
./file-upload -max-days 7 -max-downloads 5 path/to/your/file.txt
-max-days: (Optional) Maximum number of days to keep the file-max-downloads: (Optional) Maximum number of times the file can be downloaded
./file-upload -max-days 7 -max-downloads 5 example.txtThis project is licensed under the MIT License. See the LICENSE file for details.