diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-05-15 09:37:51 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2017-05-15 09:37:51 -0700 |
commit | 5cf617fb2853004accbf40f5b2fd93f3ced4949a (patch) | |
tree | b49216fe8ea903da7c3f47c8ab5119f92b00d192 | |
parent | c76b8e021091e08c49bd7ba28e1b1c8a7632f749 (diff) |
changing file perm on temp
-rw-r--r-- | system/admin/export.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/system/admin/export.go b/system/admin/export.go index 46a659b..2453eb8 100644 --- a/system/admin/export.go +++ b/system/admin/export.go @@ -70,6 +70,11 @@ func exportCSV(res http.ResponseWriter, req *http.Request, pt func() interface{} return } + err = os.Chmod(tmpFile.Name(), 0666) + if err != nil { + log.Println("chmod err:", err) + } + csvBuf := csv.NewWriter(tmpFile) t := req.URL.Query().Get("type") |