优化二维码生成

This commit is contained in:
Minho
2017-05-13 13:15:21 +08:00
parent 31ed15b666
commit 832b08448c
2 changed files with 4 additions and 1 deletions

View File

@@ -822,6 +822,9 @@ func (c *DocumentController) QrCode() {
c.Abort("500")
}
c.Ctx.ResponseWriter.Header().Set("Content-Type", "image/png")
//imgpath := filepath.Join("cache","qrcode",identify + ".png")
err = png.Encode(c.Ctx.ResponseWriter, code)
if err != nil {
beego.Error(err)