fix: remove incomplete uploaded files

pull/1030/head
Ramires Viana 2020-07-13 18:59:48 +00:00
parent 194030fcfc
commit 0727496601
1 changed files with 4 additions and 0 deletions

View File

@ -127,6 +127,10 @@ var resourcePostPutHandler = withUser(func(w http.ResponseWriter, r *http.Reques
return nil
}, action, r.URL.Path, "", d.user)
if err != nil {
_ = d.user.Fs.RemoveAll(r.URL.Path)
}
return errToStatus(err), err
})