changeset 4174:00279b36cffd

Merged
author Tom Gottfried <tom@intevation.de>
date Mon, 05 Aug 2019 16:48:11 +0200
parents d3fb2f37380b (current diff) 9cbed444b8a4 (diff)
children 1fb3a62d8ea7
files
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/misc/http.go	Mon Aug 05 16:45:48 2019 +0200
+++ b/pkg/misc/http.go	Mon Aug 05 16:48:11 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.