Don't execute upload hook when empty

This commit is contained in:
simon987 2019-04-04 19:41:40 -04:00
parent 8fee9a378b
commit 9a4741b7bb

View File

@ -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)