Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

added optional content_type to bucket.upload_file #883

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

Closed
wants to merge 1 commit into from
Closed

added optional content_type to bucket.upload_file #883

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented May 15, 2015

No description provided.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label May 15, 2015
@ghost
Copy link
Author

ghost commented May 15, 2015

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels May 15, 2015
@dhermes
Copy link
Contributor

dhermes commented May 15, 2015

Looks fine. Any reason why you don't just use the Blob.upload_* methods?

@ghost
Copy link
Author

ghost commented May 15, 2015

not particularly, either works

@dhermes
Copy link
Contributor

dhermes commented May 15, 2015

I think we've even debated making Bucket.upload_file a protected method to just encourage people to use the Blob directly.


Can you address the test failure:

TypeError: upload_from_filename() got an unexpected keyword argument 'content_type'

@ghost
Copy link
Author

ghost commented May 15, 2015

hm.. the test passes for me
I'll look into it tomorrow

@dhermes
Copy link
Contributor

dhermes commented May 15, 2015

Thanks. You are running the tests locally via tox, yes?

@ghost
Copy link
Author

ghost commented May 15, 2015

yes, I am also using the code in production

@dhermes
Copy link
Contributor

dhermes commented May 15, 2015

Notice it's a test fixture _Blob which encounters an unexpected keyword argument 'content_type': https://github.com/GoogleCloudPlatform/gcloud-python/blob/9c4867ab3a26b6f5e19f85c5d66e3c9083a8d83f/gcloud/storage/test_bucket.py#L525-L533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.