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

Support putObject to upload an empty file. #658

Merged
merged 7 commits into from
Jan 4, 2018
Merged

Conversation

shruthied
Copy link
Contributor

Fixes #657

Copy link
Member

@harshavardhana harshavardhana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix the PR title say something like

fix putObject to upload an empty file

or

Support putObject to upload an empty file

@shruthied shruthied changed the title putObject cannot upload an empty file. Supports putObject to upload an empty file. Jan 3, 2018
@shruthied
Copy link
Contributor Author

@harshavardhana changed the title as mentioned.

krishnasrinivas
krishnasrinivas previously approved these changes Jan 3, 2018
@kannappanr
Copy link
Contributor

@shruthied Travis and Appveyor failed. Please take a look at the failures and fix them.

Copy link
Contributor

@kaankabalak kaankabalak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was able to upload empty and nonempty files successfully, LGTM.

@shruthied
Copy link
Contributor Author

@kannappanr fixed all the failures. Checks have been passed.

else {
if (this.id === null) {
return
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need else statement here @shruthied because you have return statement at the end of if block above.

i.e you can do it like :

if (this.emptyStream) {
    ....
    return
}
if (this.id == null) {
    return
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed the else statement as mentioned @krishnasrinivas

@kannappanr kannappanr changed the title Supports putObject to upload an empty file. Support putObject to upload an empty file. Jan 4, 2018
@harshavardhana harshavardhana dismissed their stale review January 4, 2018 22:40

LGTM, dismissing review not needed

@kannappanr kannappanr merged commit 3920655 into minio:master Jan 4, 2018
dingjs pushed a commit to dingjs/minio-js that referenced this pull request Jan 7, 2018
Support putObject to upload an empty file.
Fixes minio#657
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.

5 participants