From f50615fec83bed70e5370e890c71c966c96e190d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Mon, 26 Mar 2018 18:11:11 +0200 Subject: [PATCH] Allow to upload empty files in stream based uploads (#958) --- 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