diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-05-15 03:59:27 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2017-05-15 03:59:27 -0700 |
commit | 779631d5dc46afbc765ee138a79bab962f11312b (patch) | |
tree | b856fbad147119c69e088e9785bc1844130b8d44 /system/admin/export.go | |
parent | 8f12938f28c0637a9261c7fcb4b0e311b8ba3b40 (diff) |
flush csv writer and fix ui
Diffstat (limited to 'system/admin/export.go')
-rw-r--r-- | system/admin/export.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/system/admin/export.go b/system/admin/export.go index 82b5279..cdd43b7 100644 --- a/system/admin/export.go +++ b/system/admin/export.go @@ -1,21 +1,20 @@ package admin import ( + "encoding/csv" "fmt" + "io/ioutil" "log" "net/http" + "os" "path/filepath" "strings" "time" - "encoding/csv" - - "io/ioutil" - "os" - "github.com/ponzu-cms/ponzu/management/format" "github.com/ponzu-cms/ponzu/system/db" "github.com/ponzu-cms/ponzu/system/item" + "github.com/tidwall/gjson" ) @@ -109,6 +108,8 @@ func exportCSV(res http.ResponseWriter, req *http.Request, pt func() interface{} } } + csvBuf.Flush() + // write the buffer to a content-disposition response csvB, err := ioutil.ReadAll(tmpFile) if err != nil { |