notifier support

This commit is contained in:
Ville Rantanen
2018-02-19 14:37:08 +02:00
parent 1be6a713a6
commit 43e45f0592
4 changed files with 77 additions and 2 deletions

View File

@@ -45,5 +45,29 @@ location /flees/ {
- 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'
- 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