Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to upload empty files in stream based uploads #958

Merged
merged 1 commit into from
Mar 26, 2018

Conversation

jespino
Copy link
Contributor

@jespino jespino commented Mar 23, 2018

With the current implementation of streams you can't upload an empty file like this.

s3cli.PutObject("test-bucket", "0-bytes-file.txt", bytes.NewReader([]byte{}), -1, options)

Basically there is a check in the end of the putObjectMultipartStreamNoLength
function that is never reached, because we filter any io.EOF error before that.
Is needed to let it pass when the partNumber is 1 to allow 0 bytes files to be
uploaded.

@kannappanr kannappanr merged commit f50615f into minio:master Mar 26, 2018
@jespino jespino deleted the 0-files-upload-on-unknown-size branch March 26, 2018 16:23
jespino added a commit to jespino/minio-go that referenced this pull request Apr 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants