A command-line tool for uploading files to Tempspace.
Project description
🚀 FileShare - Enhanced Terminal File Upload Service
A modern, terminal-style file sharing service with password protection, rate limiting, and QR code generation.
📦 Installation
Server
To run the web server, you can clone the repository and run it locally.
# Clone the repository
git clone <your-repo>
cd fileshare
# Install dependencies
pip install -r requirements.txt
# Copy environment template
cp .env.example .env
# Edit .env and change admin credentials!
nano .env
# Run the server
python main.py
Command-Line Tool (CLI)
To use the command-line tool, you can install it directly from PyPI.
pip install tempspace-cli
✨ Features
🔒 Security
- Rate Limiting: 10 uploads/hour, 100 downloads/hour per IP
- Password Protection: Optional password-protected uploads
- Secure Admin Panel: HTTP Basic Auth for debug endpoints
- File Deduplication: Automatic duplicate detection (SHA256)
- One-Time Downloads: Self-destructing links after first download
🎨 UI/UX
- Modern Terminal Design: Green-on-black terminal aesthetic
- Drag & Drop: Intuitive file upload interface
- QR Code Generation: Instant QR codes for mobile sharing
- Upload History: Local storage of recent uploads (browser)
- Toast Notifications: Non-intrusive feedback system
- Real-time Progress: Upload progress with speed indicators
- Countdown Timer: Shows time remaining until expiry
- Responsive Design: Works on mobile, tablet, and desktop
📦 File Management
- Large File Support: Up to 4GB per file
- Image Previews: Automatic preview for images
- Multiple Expiry Options: 1, 3, 6, 12, or 24 hours
- Chunked Uploads: Efficient streaming for large files
- Automatic Cleanup: Background task removes expired files
📖 Usage
Web Interface
- Open
http://localhost:8000in your browser - Drag & drop a file or click to browse
- Configure expiry time and optional password
- Upload and share the generated link
- Scan QR code for mobile access
CLI Usage
Once installed, you can use the tempspace command.
Basic Upload
tempspace /path/to/document.pdf -t 6h
Password Protected Upload
tempspace /path/to/secret.txt -t 12h -p "mypassword"
One-Time Download
tempspace /path/to/report.pdf --one-time
🔧 Configuration
Environment Variables
Create a .env file for the server:
# Admin credentials (CHANGE THESE!)
ADMIN_USER=admin
ADMIN_PASS=your-secure-password-here
# Optional: Custom limits
RATE_LIMIT_UPLOADS=10
RATE_LIMIT_DOWNLOADS=100
🛡️ Admin Endpoints
Protected by HTTP Basic Auth (use credentials from .env).
View Statistics
curl -u admin:password http://localhost:8000/debug/stats
Wipe All Files
curl -X POST -u admin:password http://localhost:8000/debug/wipe
⚠️ Warning: This deletes ALL uploaded files permanently!
📝 License
MIT License - Feel free to use and modify!
🤝 Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request
📧 Support
For issues and questions, please open a GitHub issue.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tempspace_cli-1.0.0.tar.gz.
File metadata
- Download URL: tempspace_cli-1.0.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b25863814c2afa6929aa78114e0532651219fdeedcd35d5711536e1c937118d
|
|
| MD5 |
12f0e74fa7be4d9c71f29ee2cae7061c
|
|
| BLAKE2b-256 |
2fd10a71d14fbbdd7b23821acd1077424215c40f809d650d29a723394dc8fa60
|
File details
Details for the file tempspace_cli-1.0.0-py3-none-any.whl.
File metadata
- Download URL: tempspace_cli-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37a17a719f5c45b4de5a53e1fce3e18a75230590ac9608614d51c3a015760d2c
|
|
| MD5 |
b31baa5fc701fcd62623875ed8d81d6b
|
|
| BLAKE2b-256 |
9afbea22e20e6703a7011bbf371a51e2eb4d629fd036a87402a138a0dbb9a6a5
|