diff --git a/parser.go b/parser.go index 4eb4828..d1ec7f2 100644 --- a/parser.go +++ b/parser.go @@ -88,9 +88,10 @@ process: } buf := make([]byte, 1024) - _, err := part.Read(buf) + n, err := part.Read(buf) if err != nil { if err == io.EOF { + buf = buf[:n] data.Write(buf) break }