mirror of
https://gitee.com/blackfox/geekai.git
synced 2024-12-03 12:48:31 +08:00
fix: fixed bug for upload image failed
This commit is contained in:
parent
de42a428e6
commit
dae91ed243
@ -232,6 +232,12 @@ func parameterHandlerMiddleware() gin.HandlerFunc {
|
||||
// 更新参数
|
||||
c.Request.URL.RawQuery = params.Encode()
|
||||
|
||||
contentType := c.Request.Header.Get("Content-Type")
|
||||
if strings.Contains(contentType, "multipart/form-data") {
|
||||
c.Next()
|
||||
return
|
||||
}
|
||||
|
||||
// POST JSON 参数处理
|
||||
bodyBytes, err := io.ReadAll(c.Request.Body)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user