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

Storage write streams should be able to use a pre-existing uri #1322

Closed
wants to merge 6 commits into from

Conversation

bhstahl
Copy link

@bhstahl bhstahl commented May 16, 2016

Allow users to pass through an already existing uri when creating a write stream.

// create resumable url
file.createResumableUpload((err, uri) =>  {
    // hang on to uri somehow
});

// create a new stream with the same uri
const config = { uri };
bucket.file('zebra.jpg').createWriteStream(config);

Closes #1321

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 16, 2016
@@ -1528,7 +1528,7 @@ File.prototype.startResumableUpload_ = function(dup, options) {
metadata: {}
}, options);

var uploadStream = resumableUpload({
var config = {

This comment was marked as spam.

@stephenplusplus
Copy link
Contributor

Thank you! Could you add a line in the jsdocs for:

  • Bucket#upload
  • File#createWriteStream

Something like:

 * @param {string} options.uri - The URI for an already-created resumable
 *     upload. See {module:storage/file#createResumableUpload}.

@bhstahl
Copy link
Author

bhstahl commented May 16, 2016

Ah yes, good call @stephenplusplus. Updated!

@coveralls
Copy link

coveralls commented May 16, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 006754c on bhstahl:storage-uri into 17e510b on GoogleCloudPlatform:master.

@coveralls
Copy link

coveralls commented May 16, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 006754c on bhstahl:storage-uri into 17e510b on GoogleCloudPlatform:master.

@coveralls
Copy link

coveralls commented May 16, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 006754c on bhstahl:storage-uri into 17e510b on GoogleCloudPlatform:master.

@stephenplusplus
Copy link
Contributor

Coveralls is going crazy again. Sorry I missed this the first time, could you add a test to check that the uri option is passed through to gcs-resumable-upload?

@stephenplusplus
Copy link
Contributor

Also, just released [email protected] with URI support -- can you upgrade the package.json to use this new one?

@bhstahl
Copy link
Author

bhstahl commented May 17, 2016

👍 on it @stephenplusplus

@coveralls
Copy link

coveralls commented May 17, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 9a6afeb on bhstahl:storage-uri into 17e510b on GoogleCloudPlatform:master.

@stephenplusplus
Copy link
Contributor

Merged in via 3d6fa8a. Thanks @bhstahl!

chingor13 pushed a commit that referenced this pull request Aug 26, 2022
chingor13 pushed a commit that referenced this pull request Sep 12, 2022
chingor13 pushed a commit that referenced this pull request Sep 13, 2022
chingor13 pushed a commit that referenced this pull request Sep 14, 2022
sofisl pushed a commit that referenced this pull request Sep 15, 2022
sofisl pushed a commit that referenced this pull request Sep 16, 2022
sofisl pushed a commit that referenced this pull request Sep 27, 2022
Source-Link: googleapis/synthtool@6981da4
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:3563b6b264989c4f5aa31a3682e4df36c95756cfef275d3201508947cbfc511e

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this pull request Nov 12, 2022
sofisl pushed a commit that referenced this pull request Nov 16, 2022
Source-Link: googleapis/synthtool@6981da4
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:3563b6b264989c4f5aa31a3682e4df36c95756cfef275d3201508947cbfc511e

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this pull request Nov 16, 2022
sofisl pushed a commit that referenced this pull request Nov 16, 2022
sofisl pushed a commit that referenced this pull request Nov 16, 2022
sofisl pushed a commit that referenced this pull request Nov 16, 2022
sofisl pushed a commit that referenced this pull request Nov 16, 2022
Source-Link: googleapis/synthtool@6981da4
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:3563b6b264989c4f5aa31a3682e4df36c95756cfef275d3201508947cbfc511e

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this pull request Nov 18, 2022
sofisl pushed a commit that referenced this pull request Nov 30, 2022
sofisl pushed a commit that referenced this pull request Jan 10, 2023
sofisl pushed a commit that referenced this pull request Jan 24, 2023
Source-Link: googleapis/synthtool@6981da4
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:3563b6b264989c4f5aa31a3682e4df36c95756cfef275d3201508947cbfc511e

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this pull request Jan 25, 2023
Source-Link: googleapis/synthtool@6981da4
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:3563b6b264989c4f5aa31a3682e4df36c95756cfef275d3201508947cbfc511e

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this pull request Jan 26, 2023
Source-Link: googleapis/synthtool@6981da4
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:3563b6b264989c4f5aa31a3682e4df36c95756cfef275d3201508947cbfc511e

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this pull request Sep 13, 2023
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.

4 participants