mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-17 16:56:38 +08:00
fix: fixed bug for upload image failed
This commit is contained in:
parent
eb36d0742a
commit
5a799139cd
@ -232,6 +232,12 @@ func parameterHandlerMiddleware() gin.HandlerFunc {
|
|||||||
// 更新参数
|
// 更新参数
|
||||||
c.Request.URL.RawQuery = params.Encode()
|
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 参数处理
|
// POST JSON 参数处理
|
||||||
bodyBytes, err := io.ReadAll(c.Request.Body)
|
bodyBytes, err := io.ReadAll(c.Request.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user