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

resumable upload url for browser upload #635

Closed
aschmid opened this issue Jun 1, 2015 · 3 comments
Closed

resumable upload url for browser upload #635

aschmid opened this issue Jun 1, 2015 · 3 comments
Assignees
Labels
api: storage Issues related to the Cloud Storage API. type: question Request for information or clarification. Not an issue.

Comments

@aschmid
Copy link

aschmid commented Jun 1, 2015

hey guys,

i need to upload files to the same bucket from different urls and i would like to avoid creating an actual oauth token for each url. all urls are in the format http://.myapp.com.

right now i am streaming the files through the server and uploading them with the gcloud-node library but its killing my server because the files are too big and its just too much. what i want to achieve now is make the app request an upload url which the server generates and return it to the browser so the javascript app can do the upload without bothering the server and contact the endpoint once the uplaod is done.

my question now is is there a way to request this uplaod url like described here with an actual json keyfile rather than the oauth token?

if this is not an option, will it be possible to request a single oauth token and use that one for all app subdomains i use?

thank you, andreas

@stephenplusplus
Copy link
Contributor

Can you can persist an authorized gcloud "session" (to reuse the same authorized connection) on your server, that will generate URLs on demand?

var gcloud = require('gcloud');
var gcs = gcloud.storage({
  projectId: 'project-id',
  keyFilename: 'keyfile.json'
});
var bucket = gcs.bucket('my-bucket');

var app = require('express')();

app.get('/url/:fileName', function(req, res) {
  bucket.file(req.params.fileName).getSignedUrl({
    action: 'write'
  }, function(err, url) {
    res.end(url);
  });
});

app.listen(3001);

@stephenplusplus
Copy link
Contributor

And I'm really sorry for the super long time to respond :( I hope your summer's been well!

@stephenplusplus stephenplusplus added type: question Request for information or clarification. Not an issue. api: storage Issues related to the Cloud Storage API. labels Aug 14, 2015
@stephenplusplus
Copy link
Contributor

Hey @aschmid, I'm going to close this one out. Hopefully the above solution will work or one from #641.

chingor13 pushed a commit that referenced this issue Aug 22, 2022
PiperOrigin-RevId: 456946341
Source-Link: googleapis/googleapis@88fd18d
Source-Link: googleapis/googleapis-gen@accfa37
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
chingor13 pushed a commit that referenced this issue Aug 22, 2022
🤖 I have created a release *beep* *boop*
---


## [4.1.0](googleapis/nodejs-asset@v4.0.0...v4.1.0) (2022-06-29)


### Features

* support regapic LRO ([#635](googleapis/nodejs-asset#635)) ([140ce9d](googleapis/nodejs-asset@140ce9d))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
chingor13 pushed a commit that referenced this issue Aug 22, 2022
PiperOrigin-RevId: 456946341
Source-Link: googleapis/googleapis@88fd18d
Source-Link: googleapis/googleapis-gen@accfa37
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
chingor13 pushed a commit that referenced this issue Aug 22, 2022
🤖 I have created a release *beep* *boop*
---


## [4.1.0](googleapis/nodejs-asset@v4.0.0...v4.1.0) (2022-06-29)


### Features

* support regapic LRO ([#635](googleapis/nodejs-asset#635)) ([140ce9d](googleapis/nodejs-asset@140ce9d))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
chingor13 pushed a commit that referenced this issue Aug 22, 2022
PiperOrigin-RevId: 456946341
Source-Link: googleapis/googleapis@88fd18d
Source-Link: googleapis/googleapis-gen@accfa37
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
chingor13 pushed a commit that referenced this issue Aug 22, 2022
🤖 I have created a release *beep* *boop*
---


## [4.1.0](googleapis/nodejs-asset@v4.0.0...v4.1.0) (2022-06-29)


### Features

* support regapic LRO ([#635](googleapis/nodejs-asset#635)) ([140ce9d](googleapis/nodejs-asset@140ce9d))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
sofisl pushed a commit that referenced this issue Nov 11, 2022
fix: update JS and TS protos


Source-Link: googleapis/synthtool@0a68e56
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:5b05f26103855c3a15433141389c478d1d3fe088fb5d4e3217c4793f6b3f245e

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this issue Nov 11, 2022
PiperOrigin-RevId: 456946341
Source-Link: googleapis/googleapis@88fd18d
Source-Link: googleapis/googleapis-gen@accfa37
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this issue Nov 11, 2022
🤖 I have created a release *beep* *boop*
---


## [4.1.0](googleapis/nodejs-asset@v4.0.0...v4.1.0) (2022-06-29)


### Features

* support regapic LRO ([#635](googleapis/nodejs-asset#635)) ([140ce9d](googleapis/nodejs-asset@140ce9d))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
sofisl pushed a commit that referenced this issue Jan 10, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this issue Jan 24, 2023
@chingor13 has configured our runtime environment, such that we no longer need to explicitly provide a credentials file.

How does this magic work, I didn't fully understand?

Source-Author: Benjamin E. Coe <bencoe@google.com>
Source-Date: Fri Aug 7 19:02:09 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: 94421c47802f56a44c320257b2b4c190dc7d6b68
Source-Link: googleapis/synthtool@94421c4

Co-authored-by: Alexander Fenster <fenster@google.com>
sofisl pushed a commit that referenced this issue Jan 25, 2023
@chingor13 has configured our runtime environment, such that we no longer need to explicitly provide a credentials file.

How does this magic work, I didn't fully understand?

Source-Author: Benjamin E. Coe <bencoe@google.com>
Source-Date: Fri Aug 7 19:02:09 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: 94421c47802f56a44c320257b2b4c190dc7d6b68
Source-Link: googleapis/synthtool@94421c4

Co-authored-by: Alexander Fenster <fenster@google.com>
sofisl pushed a commit that referenced this issue Sep 13, 2023
🤖 I have created a release *beep* *boop*
---


## [3.1.2](https://togithub.com/googleapis/nodejs-automl/compare/v3.1.1...v3.1.2) (2022-09-22)


### Bug Fixes

* Preserve default values in x-goog-request-params header ([#634](https://togithub.com/googleapis/nodejs-automl/issues/634)) ([1949bf9](https://togithub.com/googleapis/nodejs-automl/commit/1949bf9a26b63b4eefd13f5c6164691db46a0df2))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants