|
|
4 달 전 | |
|---|---|---|
| static | 4 달 전 | |
| templates | 4 달 전 | |
| .gitignore | 5 달 전 | |
| README.md | 5 달 전 | |
| app.py | 4 달 전 | |
| requirements.txt | 5 달 전 | |
| test.txt | 4 달 전 |
A lightweight Flask web application for temporary file uploads with automatic expiration and cleanup.
python -m venv venvsource venv/bin/activatevenv\Scripts\activatepip install -r requirements.txtmkdir templatesapp.py in root folderindex.html in templates/ folderpython app.py# Basic (localhost only)
python app.py
# Network access (all devices on LAN)
python app.py --network
# Custom domain/URL
python app.py --base-url https://files.mysite.com
# Large files (100MB limit)
python app.py --max-file-size 100
# Production example
python app.py --network --port 8080 --max-file-size 50 --base-url https://uploads.mydomain.com
| Option | Description | Default |
|---|---|---|
--host |
Bind to specific host | 127.0.0.1 |
--port |
Port number | 5000 |
--network |
Allow network access (0.0.0.0) | False |
--base-url |
Custom URL for download links | auto |
--max-file-size |
Max file size in MB | 16 |
--debug |
Enable debug mode | False |
project/
├── venv/ # Virtual environment
├── app.py # Main Flask application
├── requirements.txt # Dependencies
├── templates/
│ └── index.html # Web interface
├── uploads/ # Files storage (auto-created)
└── files.db # SQLite database (auto-created)
python app.pypython app.py --networkpython app.py --host 192.168.1.100Set BASE_URL environment variable as alternative to --base-url:
export BASE_URL=https://files.mysite.com
python app.py --network
Users can set file duration when uploading:
Files are automatically deleted after expiration.
python app.py --help
Ready to go! 🎉 Your temporary file upload server will be running with automatic cleanup and a modern web interface.