mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-13 01:42:27 +08:00
update
This commit is contained in:
4
api.go
4
api.go
@@ -430,7 +430,7 @@ func apiFileUpload(c *gin.Context) {
|
||||
}
|
||||
typ := c.Request.Header.Get("Content-Type")
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"name": filename,
|
||||
"title": filename,
|
||||
"isImage": typ[:5] == "image",
|
||||
"url": url,
|
||||
"bytes": fmt.Sprintf("%dkb", s.Size()/1000),
|
||||
@@ -445,7 +445,7 @@ func apiFileDelete(c *gin.Context) {
|
||||
}
|
||||
c.String(http.StatusOK, "删掉了吗?鬼知道。。。")
|
||||
}()
|
||||
name := c.PostForm("name")
|
||||
name := c.PostForm("title")
|
||||
if name == "" {
|
||||
err = errors.New("参数错误")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user