| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A blazing-fast, secure file uploader built with Go and Fiber that supports files up to 50GB with a beautiful terminal-style web interface and powerful CLI tool - inspired by bashupload.com.
$ ./bashupload upload largefile.zip
📁 Uploading: largefile.zip (500 MB)
Uploading... ████████████████████████████████████████ 100% | 500 MB/500 MB
✅ Upload successful!
📄 File: largefile.zip
📏 Size: 500 MB
🆔 ID: a1b2c3d4e5f6g7h8
🔗 Download URL: http://localhost:3000/d/a1b2c3d4e5f6g7h8.zip# Clone the repository
git clone https://github.com/yourusername/bashupload.git
cd bashupload
# Start with Docker Compose
make compose-up
# Or manually with Docker
make docker-run# Clone the repository
git clone https://github.com/yourusername/bashupload.git
cd bashupload
# Install dependencies
make deps
# Build the project
make build
# Run the server
make runThe server will start on http://localhost:3000
./bashupload upload path/to/your/file.zip./bashupload upload file.txt --api-key your_secret_key./bashupload upload file.txt --server https://your-domain.com --api-key your_key./bashupload info a1b2c3d4e5f6g7h8./bashupload download a1b2c3d4e5f6g7h8.zip output.zip./bashupload --helpPOST /api/upload
Content-Type: multipart/form-data
X-API-Key: your_secret_key (if required)
curl -X POST -F "file=@example.zip" -H "X-API-Key: your_key" http://localhost:3000/api/upload# Public instance
curl http://localhost:3000 -T your_file.txt
# Private instance
curl -H "X-API-Key: your_key" http://localhost:3000 -T your_file.txtGET /d/{filename-with-extension}
GET /download/{filename-with-extension}GET /api/files/{file-id}GET /api/stats# Clone repository
git clone https://github.com/yourusername/bashupload.git
cd bashupload
# Install dependencies
make deps
# Run in development mode (with auto-reload)
make dev# Build for current platform
make build
# Build for specific platforms
make build-linux
make build-windows
make build-darwin
# Create release package
make release# Run tests
make test
# Run tests with coverage
make test-coverage
# Run benchmarks
make benchmarkversion: '3.8'
services:
fileuploader:
build: .
ports:
- "3000:3000"
volumes:
- ./uploads:/app/uploads
- ./fileuploader.db:/app/fileuploader.db
restart: unless-stopped# Start services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down# Build image
docker build -t bashupload .
# Run container
docker run -d \
--name bashupload \
-p 3000:3000 \
-v $(pwd)/uploads:/app/uploads \
-v $(pwd)/bashupload.db:/app/bashupload.db \
bashupload| Variable | Default | Description |
|---|---|---|
| PORT | 3000 | Server port |
| MAX_UPLOAD_SIZE | 1GB | Maximum upload size (supports: 100MB, 1GB, 5GB, etc.) |
| MAX_DOWNLOADS | 1 | Number of times file can be downloaded before deletion |
| FILE_EXPIRE_AFTER | 3D | File expiration time (supports: 1D, 1W, 1M, 1Y, etc.) |
| API_KEY | "" | API key for authentication (optional) |
| GIN_MODE | debug | Gin mode (debug/release) |
You can configure the maximum upload size using human-readable strings:
# Set to 5GB
export MAX_UPLOAD_SIZE=5GB
# Set to 100MB
export MAX_UPLOAD_SIZE=100MB
# Set to 500MB
export MAX_UPLOAD_SIZE=500MB
# Set to 2.5GB (decimal supported)
export MAX_UPLOAD_SIZE=2.5GB
# Still supports bytes if you prefer
export MAX_UPLOAD_SIZE=1073741824Supported formats:
Case insensitive: 1gb, 1GB, 1Gb all work the same
To run a private instance that requires API key authentication:
# Set API key environment variable
export API_KEY="your_super_secret_api_key_here"
# Set custom upload limit (human readable)
export MAX_UPLOAD_SIZE=5GB
# Allow multiple downloads per file
export MAX_DOWNLOADS=5
# Set custom expiration time
export FILE_EXPIRE_AFTER=1W
# Run bashupload server
./bashupload-serverOr with Docker:
# Edit docker-compose.yml and set environment variables
docker-compose up -dExample configurations:
# Quick sharing: 1 hour, single download, small files
export MAX_UPLOAD_SIZE=50MB
export MAX_DOWNLOADS=1
export FILE_EXPIRE_AFTER=1H
./bashupload-server
# Team sharing: 1 week, multiple downloads, larger files
export MAX_UPLOAD_SIZE=2.5GB
export MAX_DOWNLOADS=10
export FILE_EXPIRE_AFTER=1W
./bashupload-server
# Long-term storage: 6 months, unlimited downloads
export MAX_UPLOAD_SIZE=1GB
export MAX_DOWNLOADS=999
export FILE_EXPIRE_AFTER=6MO
./bashupload-server
# Archive sharing: 1 year, 100 downloads, large files
export MAX_UPLOAD_SIZE=10GB
export MAX_DOWNLOADS=100
export FILE_EXPIRE_AFTER=1Y
./bashupload-serverOr with Docker:
# Edit docker-compose.yml and uncomment API_KEY line
docker-compose up -dThe server can be configured by environment variables:
bashupload/ ├── main.go # Main server application ├── cmd/cli/main.go # CLI application ├── templates/ │ └── index.html # Web interface template ├── static/ │ └── style.css # Terminal-style CSS ├── go.mod # Go module definition ├── go.sum # Go module checksums ├── Dockerfile # Docker configuration ├── docker-compose.yml # Docker Compose configuration ├── Makefile # Build and development commands ├── setup.sh # Project setup script ├── README.md # This file ├── uploads/ # Upload directory (created automatically) └── bashupload.db # SQLite database (created automatically)
{
"success": true,
"message": "File uploaded successfully",
"unique_id": "a1b2c3d4e5f6g7h8",
"download_url": "http://localhost:3000/d/a1b2c3d4e5f6g7h8",
"file_size": 1048576
}{
"success": true,
"data": {
"id": 1,
"unique_id": "a1b2c3d4e5f6g7h8",
"original_name": "example.zip",
"file_size": 1048576,
"mime_type": "application/zip",
"extension": ".zip",
"uploaded_at": "2023-12-07T10:30:00Z",
"downloads": 5
}
}# Check server URL
./uploader upload file.txt --server http://correct-url:3000 --verbose# Reset database
make db-reset# Check logs
docker-compose logs fileuploader
# Restart container
docker-compose restart fileuploaderEnable verbose logging:
# CLI
./uploader upload file.txt --verbose
# Server
PORT=3000 GIN_MODE=debug ./serverThis project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ and Go - Inspired by bashupload.com
| Back | FazBrowse Home | New Git URL |