mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-06-16 05:55:33 +00:00
fix: fix upload specify file format is fail
This commit is contained in:
parent
54a115ae89
commit
3e26c9a8bf
@ -116,6 +116,12 @@ func InitV2Router() http.Handler {
|
|||||||
// })
|
// })
|
||||||
|
|
||||||
e.Use(middleware.OapiRequestValidatorWithOptions(_swagger, &middleware.Options{
|
e.Use(middleware.OapiRequestValidatorWithOptions(_swagger, &middleware.Options{
|
||||||
|
Skipper: func(c echo.Context) bool {
|
||||||
|
// jump validate when upload file
|
||||||
|
// because file upload can't pass validate
|
||||||
|
// issue: https://github.com/deepmap/oapi-codegen/issues/514
|
||||||
|
return strings.Contains(c.Request().URL.Path, "file/upload")
|
||||||
|
},
|
||||||
Options: openapi3filter.Options{AuthenticationFunc: openapi3filter.NoopAuthenticationFunc},
|
Options: openapi3filter.Options{AuthenticationFunc: openapi3filter.NoopAuthenticationFunc},
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user