You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Authorization: Bearer your_auth_token (how to get auth_token) #818
question: will the API give me the bearer token it is using?
I'm able to create signed urls with gcloud-node but I'm trying to follow the resumable download docs. they suggest starting an upload on the server and passing the session to the client. looks easy except for the header:
Authorization: Bearer your_auth_token
can i do something like gcs.getAuth after some kind of init?
We don't have this officially supported, but there's an opening if you go through some private properties.
With your Storage instance, try:
varreqOpts={uri: '...'};// what you would pass to the request modulestorage.makeAuthorizedRequest_(reqOpts,{onAuthorized: function(err,authorizedReqOpts){// authorizedReqOpts.headers.Authorization = 'bearer token'}});
I think our library could eventually add support for just starting a resumable upload, handing off the responsibility to the user to see it through. We currently support resumable uploads, but wrap the whole thing and hide away the details.
@navicore Since this issue, I moved all of our resumable logic into gcs-resumable-upload. You can use it to just get a resumable URI:
varupload=require('gcs-resumable-upload');upload.createURI({bucket: 'bucket-name',file: 'file-name',authConfig: {// how you normally auth to gcloud, ex:keyFilename: 'keyfile.json'}},function(err,uri){});
Is there the option to set the origin with this method? We're trying to use our API to generate a resumable uri, but the client is running on a different subdomain.
I think @janesconference was going to help us implement that in gcs-resumable-upload. I opened an issue about it here: googleapis/gcs-resumable-upload#6. Feel free to subscribe to that one to track the progress.
Activity
stephenplusplus commentedon Aug 24, 2015
We don't have this officially supported, but there's an opening if you go through some private properties.
With your Storage instance, try:
I also made a module for exactly this which uses the same authorization settings as this library: https://github.com/stephenplusplus/google-auto-auth
I think our library could eventually add support for just starting a resumable upload, handing off the responsibility to the user to see it through. We currently support resumable uploads, but wrap the whole thing and hide away the details.
jgeewax commentedon Aug 24, 2015
stephenplusplus commentedon Aug 24, 2015
Sure, new ticket it is. Thanks for bringing this issue up, @navicore!
navicore commentedon Aug 24, 2015
awesome help, thanks!
stephenplusplus commentedon Aug 31, 2015
@navicore Since this issue, I moved all of our resumable logic into gcs-resumable-upload. You can use it to just get a resumable URI:
gotmikhail commentedon Feb 1, 2016
Is there the option to set the
originwith this method? We're trying to use our API to generate a resumable uri, but the client is running on a different subdomain.stephenplusplus commentedon Feb 1, 2016
I think @janesconference was going to help us implement that in gcs-resumable-upload. I opened an issue about it here: googleapis/gcs-resumable-upload#6. Feel free to subscribe to that one to track the progress.
gotmikhail commentedon Feb 1, 2016
@stephenplusplus Any other options? Ie.,
createWriteStream? Or, is it that setting theoriginoption isn't available right now at all?stephenplusplus commentedon Feb 1, 2016
I don't believe any other options exist, sadly. I'll work on adding support asap.
chore: start tracking obsolete files (#818)
1 remaining item
chore(deps): update dependency sinon to v12 (#818)
fix: initial module in golint presubmit check (#818)
fix: initial module in golint presubmit check (#818)
fix: initial module in golint presubmit check (#818)
fix: initial module in golint presubmit check (#818)
fix: initial module in golint presubmit check (#818)
fix: initial module in golint presubmit check (#818)
fix: initial module in golint presubmit check (#818)
fix: initial module in golint presubmit check (#818)
chore(deps): update dependency jsdoc-fresh to v5 (#818)
chore: [node] add auto-approve templates, and install dependencies wi…
build(node): add KOKORO_BUILD_ARTIFACTS_SUBDIR to env (#818)
build(node): add KOKORO_BUILD_ARTIFACTS_SUBDIR to env (#818)
build(node): add KOKORO_BUILD_ARTIFACTS_SUBDIR to env (#818)
build(node): add KOKORO_BUILD_ARTIFACTS_SUBDIR to env (googleapis#818)