update vendor & fix upload file url & fix judge file type

This commit is contained in:
deepzz0
2018-01-06 23:24:27 +08:00
parent badc62e3f0
commit 3245c0e0d3
165 changed files with 3788 additions and 517 deletions

2
api.go
View File

@@ -437,7 +437,7 @@ func apiFileUpload(c *gin.Context) {
c.String(http.StatusBadRequest, err.Error())
return
}
typ := c.Request.Header.Get("Content-Type")
typ := header.Header.Get("Content-Type")
c.JSON(http.StatusOK, gin.H{
"title": filename,
"isImage": typ[:5] == "image",