From 96930808c8ec927e45293999ccd9644955d6a39f Mon Sep 17 00:00:00 2001 From: Matteo Suppo Date: Mon, 8 Aug 2016 17:24:48 +0200 Subject: [PATCH] Add debug messages to understand what's going wrong with the zero upload --- conn.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/conn.go b/conn.go index 8497ef794..3b5ac692d 100644 --- a/conn.go +++ b/conn.go @@ -111,7 +111,12 @@ func uploadHandler(c *gin.Context) { } for _, extraFile := range data.ExtraFiles { - ioutil.WriteFile(filepath.Join(filepath.Dir(filePath), extraFile.Filename), extraFile.Hex, 0644) + path := filepath.Join(filepath.Dir(filePath), extraFile.Filename) + log.Printf("Saving %s on %s", extraFile.Filename, path) + err := ioutil.WriteFile(path, extraFile.Hex, 0644) + if err != nil { + log.Printf(err.Error()) + } } if data.Rewrite != "" {