From 8d9451124ca328a3cf8617ed4e38a48e98c84c0b Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Thu, 12 Aug 2021 22:17:24 +0800 Subject: [PATCH] Improve UploadFile() error handling. --- controllers/account.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/account.go b/controllers/account.go index 441a77e0..4e3023d1 100644 --- a/controllers/account.go +++ b/controllers/account.go @@ -238,7 +238,7 @@ func (c *ApiController) UploadFile() { file, header, err := c.GetFile("file") defer file.Close() if err != nil { - c.ResponseError("Missing parameter") + c.ResponseError(err.Error()) return }