mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
actions: add pre-download and pre-upload
Downloads and uploads can be denied based on hook response
This commit is contained in:
@@ -461,7 +461,7 @@ func downloadFile(w http.ResponseWriter, r *http.Request, connection *Connection
|
||||
}
|
||||
responseStatus = http.StatusPartialContent
|
||||
}
|
||||
reader, err := connection.getFileReader(name, offset)
|
||||
reader, err := connection.getFileReader(name, offset, r.Method)
|
||||
if err != nil {
|
||||
renderFilesPage(w, r, nil, name, fmt.Sprintf("unable to read file %#v: %v", name, err))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user