1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-08 20:41:57 +00:00

New Context.FormFiles method

This commit is contained in:
Gerasimos (Makis) Maropoulos
2021-06-07 15:33:19 +03:00
parent 32291fa59e
commit 8f9140b705
3 changed files with 70 additions and 1 deletions

View File

@@ -396,6 +396,7 @@ var dirOpts = iris.DirOptions{
## New Context Methods
- `Context.FormFiles(key string, before ...func(*Context, *multipart.FileHeader) bool) (files []multipart.File, headers []*multipart.FileHeader, err error)` method.
- `Context.ReadURL(ptr interface{}) error` shortcut of `ReadParams` and `ReadQuery`. Binds URL dynamic path parameters and URL query parameters to the given "ptr" pointer of a struct value.
- `Context.SetUser(User)` and `Context.User() User` to store and retrieve an authenticated client. Read more [here](https://github.com/iris-contrib/middleware/issues/63).
- `Context.SetLogoutFunc(fn interface{}, persistenceArgs ...interface{})` and `Logout(args ...interface{}) error` methods to allow different kind of auth middlewares to be able to set a "logout" a user/client feature with a single function, the route handler may not be aware of the implementation of the authentication used.