From 1b5b68c963c46444a9ccce5a59b7e1c717f49397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Fri, 23 Mar 2018 10:02:10 +0100 Subject: [PATCH] Allow to upload empty files in stream based uploads --- api-put-object.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-put-object.go b/api-put-object.go index 530578277..2402a7167 100644 --- a/api-put-object.go +++ b/api-put-object.go @@ -208,7 +208,7 @@ func (c Client) putObjectMultipartStreamNoLength(ctx context.Context, bucketName if rErr == io.EOF && partNumber > 1 { break } - if rErr != nil && rErr != io.ErrUnexpectedEOF { + if rErr != nil && rErr != io.ErrUnexpectedEOF && rErr != io.EOF { return 0, rErr } // Update progress reader appropriately to the latest offset