GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Allow empty files to be uploaded. by lukesneeringer · Pull Request #25 · googleapis/google-resumable-media-python

This repository was archived by the owner on May 6, 2026. It is now read-only.

Conversation

@lukesneeringer

@lukesneeringer lukesneeringer commented Aug 7, 2017

Copy link
Copy Markdown
Contributor

@dhermes I am not sure this is actually the correct fix for googleapis/google-cloud-python#3685, but it seems logical and in line with what the original reporter expected.

If this is the wrong answer, I would appreciate guidance on what the correct answer is.

Fixes googleapis/google-cloud-python#3685

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Luke Sneeringer
Allow empty files to be uploaded.
acb1468
Fixes googleapis/google-cloud-python#3685
@lukesneeringer lukesneeringer added the bug label Aug 7, 2017
@lukesneeringer
lukesneeringer requested a review from dhermes August 7, 2017 14:37
@lukesneeringer lukesneeringer mentioned this pull request Aug 7, 2017
Unable to upload empty file? googleapis/google-cloud-python#3685
Closed
dhermes
dhermes reviewed Aug 7, 2017
View reviewed changes
Comment thread google/resumable_media/_upload.py Outdated

content_range = get_content_range(start_byte, end_byte, total_bytes)
return start_byte, end_byte, payload, content_range
return start_byte, max([end_byte, 0]), payload, content_range

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes
Explicitly supporting total_bytes == 0 in get_next_chunk().
2341e6d
In the process, also dropping `end_byte` as part of the
returned values in `get_next_chunk()`. This is because the
function only has one caller and that caller does not use
the `end_byte`.
@googlebot

googlebot commented Aug 7, 2017

Copy link
Copy Markdown

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dhermes
dhermes reviewed Aug 7, 2017
View reviewed changes
Comment thread google/resumable_media/_upload.py
# stream to be at the beginning.
if num_bytes_read != 0:
raise ValueError(
u'Stream specified as empty, but produced non-empty content.')

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Aug 7, 2017

Copy link
Copy Markdown
Contributor

Merging based on a Hangouts LGTM from @lukesneeringer

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes
dhermes merged commit 0109aaa into master Aug 7, 2017
@dhermes
dhermes deleted the allow-empty-files branch August 7, 2017 17:13
@dhermes dhermes mentioned this pull request Aug 7, 2017
Updating version to 0.2.3. #26
Merged
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@dhermes dhermes dhermes left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Unable to upload empty file?

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@lukesneeringer @googlebot @dhermes
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.