Mercurial > gemma
changeset 4172:9cbed444b8a4
Made 'golint' and 'staticcheck' happy with misc package.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 05 Aug 2019 16:47:03 +0200 |
parents | 5a650cde0574 |
children | 00279b36cffd |
files | pkg/misc/http.go |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/pkg/misc/http.go Mon Aug 05 16:43:31 2019 +0200 +++ b/pkg/misc/http.go Mon Aug 05 16:47:03 2019 +0200 @@ -24,6 +24,12 @@ "gemma.intevation.de/gemma/pkg/config" ) +// StoreUploadedFile stores a file upload file from +// a given HTTP request identified by a given field name +// in a file with a path build by the config.TmpDir and +// the given file name. +// If the file is long than the given limit maxSize +// this function returns an error. func StoreUploadedFile(req *http.Request, field, fname string, maxSize int64) (string, error) { // Check for direct upload.