File Manager Hooks
This hook script is to be called before DA runs anything from
Saves needing to use
all_pre.sh for File Manager-related blocks.
All GET/POST variables are passed via the environment.
- path : directory where the action is happening
- api (0|1): whether or not the action originated from the api (CMD_API_FILE_MANAGER)
- fileX : file name of uploaded file... variable generated for every uploaded file.
Custom hook script to run after a User has finished uploading a file in the
This would be useful if you'd like to run ClamAV on a given file after the upload.
Note that DA doesn't take any special actions on the files based on the output, other than throwing an error in the resulting upload message.
If you exit with a non-zero result, be sure to echo some text to clarify what the problem is.
E.g., if there was a virus (as decided by ClamAV), you might want to delete the uploaded file in your script, echo a notice about that, and
- file: location of uploaded file
- username: uploader username
- home: home directory of user