We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
你好,我用了这个中间件,在上传大文件的时候会在服务端报错,客户端收不到任何信息
package main import ( "net/http" limits "github.com/gin-contrib/size" "github.com/gin-gonic/gin" ) func main() { r := gin.Default() r.Use(limits.RequestSizeLimiter(10)) r.POST("/", handler) _ = r.Run(":8080") } func handler(ctx *gin.Context) { if file, err := ctx.FormFile("file"); err != nil { ctx.JSON(http.StatusOK, gin.H{"msg": "fail: " + err.Error()}) } else { ctx.JSON(http.StatusOK, gin.H{"msg": "ok: " + file.Filename}) } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
你好,我用了这个中间件,在上传大文件的时候会在服务端报错,客户端收不到任何信息
The text was updated successfully, but these errors were encountered: