mirror of
https://github.com/simon987/ws_bucket.git
synced 2025-04-10 14:06:46 +00:00
Don't execute upload hook when empty
This commit is contained in:
parent
8fee9a378b
commit
9a4741b7bb
@ -153,6 +153,10 @@ func (api *WebApi) Upload(ctx *fasthttp.RequestCtx) {
|
||||
|
||||
func executeUploadHook(slot UploadSlot) {
|
||||
|
||||
if slot.UploadHook == "" {
|
||||
return
|
||||
}
|
||||
|
||||
path := filepath.Join(WorkDir, slot.FileName)
|
||||
|
||||
commandStr := strings.Replace(slot.UploadHook, "$1", "\""+path+"\"", -1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user