Title: Uploading a file with storage and a different key is ... confusing? · Issue #787 · googleapis/google-cloud-python · GitHub
Open Graph Title: Uploading a file with storage and a different key is ... confusing? · Issue #787 · googleapis/google-cloud-python
X Title: Uploading a file with storage and a different key is ... confusing? · Issue #787 · googleapis/google-cloud-python
Description: I think the following code works fine on GCE: from gcloud import storage bucket = storage.get_bucket('my-bucket') bucket.upload_file('local.png', 'remote.png') Now I want to change the credentials, since I'm not on GCE/GAE. How do I do t...
Open Graph Description: I think the following code works fine on GCE: from gcloud import storage bucket = storage.get_bucket('my-bucket') bucket.upload_file('local.png', 'remote.png') Now I want to change the credentials,...
X Description: I think the following code works fine on GCE: from gcloud import storage bucket = storage.get_bucket('my-bucket') bucket.upload_file('local.png', 'remote.png') Now I want to...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/787
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Uploading a file with storage and a different key is ... confusing?","articleBody":"I think the following code works fine on GCE:\n\n``` python\nfrom gcloud import storage\nbucket = storage.get_bucket('my-bucket')\nbucket.upload_file('local.png', 'remote.png')\n```\n\nNow I want to change the credentials, since I'm not on GCE/GAE. How do I do that? Could it be...\n\n``` python\nfrom gcloud import storage\nstorage.set_credentials_json('path/to/creds.json')\nbucket = storage.get_bucket('my-bucket')\nbucket.upload_file('local.png', 'remote.png')\n```\n\nI couldn't find this in the docs (though I'll admit I didn't scour it to death)... so feel free to close and link if you know where this lives...\n","author":{"url":"https://github.com/jgeewax","@type":"Person","name":"jgeewax"},"datePublished":"2015-03-31T18:04:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/787/google-cloud-python/issues/787"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c1e80bdb-ced2-b204-61ae-79a2ce59894e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C7A0:A8C8D:1CFAD7:2A0845:6A4E289D |
| html-safe-nonce | c23a5697d7dcb275a15af6814d0a7d143849097bf2a8ebc19827bb9dcd6a94c5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDN0EwOkE4QzhEOjFDRkFENzoyQTA4NDU6NkE0RTI4OUQiLCJ2aXNpdG9yX2lkIjoiNjExNTA1MTk4NDAxNTczMDg0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c97f6244a05ed986e6888fb49385f193a3503520e50ab8e4e1de97135d7df505 |
| hovercard-subject-tag | issue:65511212 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/787/issue_layout |
| twitter:image | https://opengraph.githubassets.com/656c94ec3ba7fbfb939ad52ae30c4066c2c148a0e4af541faf1974b6678eea17/googleapis/google-cloud-python/issues/787 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/656c94ec3ba7fbfb939ad52ae30c4066c2c148a0e4af541faf1974b6678eea17/googleapis/google-cloud-python/issues/787 |
| og:image:alt | I think the following code works fine on GCE: from gcloud import storage bucket = storage.get_bucket('my-bucket') bucket.upload_file('local.png', 'remote.png') Now I want to change the credentials,... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jgeewax |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d9dd20d38f8ae3c4cb6b597807431db300d0bd2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width