What are event listeners
Event listeners allow you to listen and trigger one or more actions when a filesystem event happens.
For example, let's say you want to get an email each time a file ending with .pdf is uploaded. You can achieve this by using an event listener.
Upload
- triggered when a file is uploaded
First upload
- triggered when a user uploads his first file
Download
- triggered when a file is downloaded
First download
- triggered when a user downloads his first file
Delete
- triggered when a file is deleted
Rename
- triggered when a file is renamed
mkdir
- triggered when a directory is created
rmdir
- triggered when a directory is removed
ssh_cmd -
triggered when a command is successfully executed via SSH
E-Mail
- an email is sent to the configured address
Webhook
- a post request is made to the configured endpoint
The following where conditions are supported by a filter:
Path
Username
The following logic operators are supported by a filter:
Contains
Does not contain
Starts with
Ends with
Equals
Supported events
Supported actions
Filters
In case you want to exclude (or include) only some specific files, you must apply a filter. In the first section, we gave an example of an event listener which sends an email each time a file with the extension .pdf is uploaded. This can be achieved by using a Ends with rule on the path returned by the event. A screenshot of the filter: