go-zero
go-zero copied to clipboard
maxBytes invalid
Describe the bug "In the API file, I set maxBytes for the router group to 1,368,709,120, but after generating the code and running it, the actual maxBytes is still the default value."
-
The code is
server.AddRoutes( []rest.Route{ { Method: http.MethodPost, Path: "/xxx/xxx", Handler: aioxiekang.Upload(serverCtx), }, }, rest.WithPrefix("/xxx/xxx"), rest.WithMaxBytes(1368709120),
)
2. The error is
request entity too large, limit is 1048576, but got 1448382, rejected with code 413
**Environments (please complete the following information):**
- OS: [e.g. Windows]
- go-zero version [e.g. 1.7.2]
- goctl version [e.g. 1.7.2, optional]
Can't reproduce your problem, from the generated code there seems to be no problem, can you provide the api file?
It's already solved because I added the prefix prefix