diff options
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 { |