add support for custom actions

Configurable custom commands and/or HTTP notifications on SFTP upload, download, delete or rename
This commit is contained in:
Nicola Murino
2019-07-27 09:38:09 +02:00
parent 70ae68a7c4
commit 48451a9924
12 changed files with 219 additions and 69 deletions

View File

@@ -29,7 +29,7 @@ func startQuotaScan(w http.ResponseWriter, r *http.Request) {
if sftpd.AddQuotaScan(user.Username) {
sendAPIResponse(w, r, err, "Scan started", http.StatusCreated)
go func() {
numFiles, size, err := utils.ScanDirContents(user.HomeDir)
numFiles, size, _, err := utils.ScanDirContents(user.HomeDir)
if err != nil {
logger.Warn(logSender, "error scanning user home dir %v: %v", user.HomeDir, err)
} else {