diff options
author | Valery Piashchynski <[email protected]> | 2021-01-21 13:25:36 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-01-21 13:25:36 +0300 |
commit | 7da6c78449776e1f3c6716250bca0b712a0423a4 (patch) | |
tree | f3512de66aca2bba408485a0ea2fc936c0e4fb9b /plugins/http/uploads.go | |
parent | 0ff05b2732b4fd0783f959c94c54d7e39169f979 (diff) |
Uniform all configs
Add debug server
Check nil's for all plugin intialization
Diffstat (limited to 'plugins/http/uploads.go')
-rw-r--r-- | plugins/http/uploads.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/http/uploads.go b/plugins/http/uploads.go index d5196844..f9f8e1c8 100644 --- a/plugins/http/uploads.go +++ b/plugins/http/uploads.go @@ -1,6 +1,7 @@ package http import ( + "github.com/spiral/roadrunner/v2/plugins/http/config" "github.com/spiral/roadrunner/v2/plugins/logger" "io" @@ -30,7 +31,7 @@ const ( // Uploads tree manages uploaded files tree and temporary files. type Uploads struct { // associated temp directory and forbidden extensions. - cfg UploadsConfig + cfg config.Uploads // pre processed data tree for Uploads. tree fileTree @@ -112,7 +113,7 @@ func NewUpload(f *multipart.FileHeader) *FileUpload { // STACK // DEFER FILE CLOSE (2) // DEFER TMP CLOSE (1) -func (f *FileUpload) Open(cfg UploadsConfig) (err error) { +func (f *FileUpload) Open(cfg config.Uploads) (err error) { if cfg.Forbids(f.Name) { f.Error = UploadErrorExtension return nil |