Refactoring uploading

- DisablePreParseMultipartForm = true
- used `fetchMultipartFile` method instead of `MultipartForm`
- don't store temporary files, only streaming

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
This commit is contained in:
Evgeniy Kulikov 2021-02-13 19:17:01 +03:00
parent 3b8bf3017d
commit 3f635a018a
No known key found for this signature in database
GPG key ID: BF6AEE0A2A699BF2
3 changed files with 52 additions and 44 deletions

2
app.go
View file

@ -102,7 +102,7 @@ func newApp(ctx context.Context, opt ...Option) App {
// FIXME don't work with StreamRequestBody,
// some bugs with readMultipartForm
// https://github.com/valyala/fasthttp/issues/968
// a.web.DisablePreParseMultipartForm = true
a.web.DisablePreParseMultipartForm = true
a.web.StreamRequestBody = a.cfg.GetBool(cfgWebStreamRequestBody)
// -- -- -- -- -- -- -- -- -- --