diff options
author | Ollie Phillips <oliver@eantics.co.uk> | 2019-03-25 21:56:32 +0000 |
---|---|---|
committer | Ollie Phillips <oliver@eantics.co.uk> | 2019-03-25 21:56:32 +0000 |
commit | df5b487fec9bdc6b98fc6cbc60c45e360d18eeb4 (patch) | |
tree | e8e1988d1a76753a9ea78f3da726975a8f25978f /system | |
parent | 3ef2dc0da5d39686da48ac90e8a8a2c6b861e549 (diff) |
dev
Diffstat (limited to 'system')
-rw-r--r-- | system/admin/handlers.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go index d0818ec..ba16998 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -2200,6 +2200,17 @@ func deleteUploadHandler(res http.ResponseWriter, req *http.Request) { return } + // get upload data + upload, err := db.Upload(t + ":" + id) + if err != nil { + log.Println(err) + res.WriteHeader(http.StatusInternalServerError) + return + } + + // use path to delete the physical file from disk + log.Println("file data:", string(upload)) + err = db.DeleteUpload(t + ":" + id) if err != nil { log.Println(err) |