Mercurial > gemma
diff pkg/controllers/geostyling.go @ 4918:4a9a1e323e11 fairway-marks-import
First version of geo styles in ZIP files.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 13 Feb 2020 18:23:58 +0100 |
parents | 22148eb0f986 |
children | 5f47eeea988d |
line wrap: on
line diff
--- a/pkg/controllers/geostyling.go Thu Feb 13 11:37:22 2020 +0100 +++ b/pkg/controllers/geostyling.go Thu Feb 13 18:23:58 2020 +0100 @@ -31,20 +31,20 @@ styleName = "style" ) -func extractStyle(req *http.Request) (string, error) { +func extractStyle(req *http.Request) ([]byte, error) { f, _, err := req.FormFile(styleName) if err != nil { - return "", err + return nil, err } defer f.Close() var buf bytes.Buffer if _, err := io.Copy(&buf, io.LimitReader(f, maxStyleSize)); err != nil { - return "", err + return nil, err } - return buf.String(), nil + return buf.Bytes(), nil } func supportedWMSFeature(name string) bool {