# FLEES A very small file sharing website. The name comes from mispronouncing "files" very badly. # installation - `cp env.example .env` - `cp data/config.json.example data/config.json` - `cp data/shares.json.example data/shares.json` - `touch code/notifier.py` - `docker-compose up --build` - open URL: http://localhost:8136/list/test - configure shares with data/shares.json - generate and manage shares with utils/flees-manager.py - configure service with data/config.json - uid = user id for new files - workers = parallel processes (i.e. one upload reserves a process) - timeout = timeout for processes, single upload might take a long time! - configure bind host and port in .env - proxy with nginx, match body size and timeout to your needs: ``` location /flees/ { proxy_pass http://localhost:8136/; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Scheme $scheme; proxy_set_header X-Script-Name /flees; client_max_body_size 8G; client_body_timeout 240s; } ``` - configure local port in `docker-compose.yaml` - directly login with URLs: - http://host/list/[share name]/[hashed password] - download with curl (etc.) - http://host/download/[share name]/[hashed password]/[filename] - upload with curl (etc.) - curl -F file=@my.file http://host/upload/[share name]/[hashed password] - "direct link" is a sharing link that does not require other passwords, and is unique to each file. (there should be no danger in sharing a file, and the password to rest of the files leaking) # custom notifier - Add a notifier module, and refer to it in the config with: "notifier": "python-path-to-file:class-name" ex.: "notifier": "notifier:Notifier" - The class must have method `def notify(self, message)` Check the notifier.py.template for clues. Flees will send notification on upload and download events, with a Dict like this: ``` { "recipient": "share recipient", "share": "name", "filename": "file_path", "operation": "direct_download" } ``` Operation is one of download, direct_download, zip_download, or upload