Simple upload service with TOTP support, made with Python Flask
.forgejo/workflows | ||
templates | ||
.env.example | ||
.gitignore | ||
api.md | ||
cache.json | ||
Dockerfile | ||
LICENSE | ||
providers.md | ||
README.md | ||
requirements.txt | ||
server.py |
FastFile
Simple upload service with TOTP support, made with Python Flask.
This is basically an open-sourced + enhanced version of the one I had in my old PythonAnywhere site in 2023.
Features
- TOTP authentication
- Randomize file names or keep the original one
- View both frontend and raw files
- Upload to different storage providers
- Local file
- AWS S3 (or any other S3-compatible Object storage provider)
- Cumulonimbus (alekeagle.me)
- ImgBB (imgbb.com)
- See providers.md for guides
Upcoming features
- Better Object Storage support (using
boto3
instead ofrclone
) - Persistent logins
- Redesign in Bulma
- Support Zipline
- API
- Optional fastfileV2 interface (file viewer stays the same)
- Home screen showing already uploaded files
- Bulk upload
- Multi-user
- Multi-provider
Screenshots (V1)
Installation
Via Docker
Create this docker-compose.yml
file in an empty directory:
services:
fastfile:
image: git.swee.codes/swee/fastfile:latest
restart: unless-stopped
ports:
- 2007:2007
env_file: .env
volumes:
- ./files:/files
- ./cache.json:/app/cache.json
Create the .env
file, you can use .env.example
as an example for all of fastfile's properties
And run this:
mkdir files
touch cache.json
docker compose up -d
Directly
Install packages:
Directly: pip install flask gunicorn pytotp magic boto3
Debian/Ubuntu: sudo apt install python3-flask python3-gunicorn python3-pyotp python3-magic python3-boto3
Alpine: apk add py3-flask py3-gunicorn py3-otp py3-magic py3-boto3
Run:
source .env # Make sure you configure .env!
gunicorn -w --bind=0.0.0.0:2007 server:app
How to get TOTP key?
Install the pyotp
(py3-otp
in alpine) module as shown above, run
python3 -c "import pyotp; print(pyotp.random_base32())"
Copy the output and use in your environment variable and authenticator app.