file_manager_upload_post.sh

Version 1.51

Feature
Finished

Custom hook script to run after a User has finished uploading a file in the CMD_FILE_MANAGER or CMD_API_FILE_MANAGER. Would be useful if you'd like to run ClamAV on a given file after the upload. Exit with a 0 code if checks are ok. Exit with a non-zero result if there was an error. Note that DA doesn't take any special actions on the files based on the output, other than throwing an error in the result upload message. If you exit with a non-zero result, be sure to echo some text to clarify what the problem is. Eg: 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 exit 1; ----- Environmental variables: file=/home/fred/path/to/uploaded/file.exe home=/home/fred username=fred

Interested to try DirectAdmin? Get a 30-day Free Trial!