Giter Club home page Giter Club logo

Comments (6)

lukesneeringer avatar lukesneeringer commented on July 16, 2024

From @stephenplusplus on April 22, 2017 1:24

createResumableUpload initiates a reusable upload. Our 'upload' and 'createWriteStream' methods do the re-trying automatically. If you want to handle that behavior yourself, or outside of our client, you'd use 'createResumableUpload' to get a session URI.

These are the specifications our implementation adheres to: https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload

from nodejs-storage.

lukesneeringer avatar lukesneeringer commented on July 16, 2024

From @odigity on April 22, 2017 1:50

I was under the impression that the Node lib is only appropriate to use in the context of:

  • server-side code
  • with authentication as a User or Service Account

Rather than in the browser for an anonymous (from GCS's perspective) user.

Are you suggesting I import the @google-cloud/storage package in my React app and use the createResumableUpload method with a signed URL?

from nodejs-storage.

lukesneeringer avatar lukesneeringer commented on July 16, 2024

From @stephenplusplus on April 22, 2017 1:56

Your context assumptions are correct, but you're free to experiment in using it in others. We don't have any prescribed recipes for how to integrate with "x", but StackOverflow is a good place to tap into the community around it. In general, if you have users accessing from a browser, you would likely ping a backend to make the necessary requests to the Storage API, as opposed to doing it all through the browser.

If you do end up posting on SO, please link back so other users with the same interest can follow along. And of course, discussion can continue here with questions related to our library.

from nodejs-storage.

lukesneeringer avatar lukesneeringer commented on July 16, 2024

From @odigity on April 22, 2017 8:50

Are you saying the absence of being able to use the Node.js lib to generate a signed URL for a resumable download (despite this feature existing on gsutil) is intentional, and not an oversight? Because I cannot fathom how that can be.

The end result is that I'm going to have to make my app server shell out to call gsutil instead of using the Node.js lib unless this is corrected.

from nodejs-storage.

lukesneeringer avatar lukesneeringer commented on July 16, 2024

From @odigity on April 23, 2017 23:3

After several hours of working through the problem, it seems to me that you could extend getSignedUrl to support resumable simply by adding 'POST' to the list of accepted methods. Then I could manually specify the x-goog-resumable:start header using extensionHeaders.

(Until that happens, I literally have to write and maintain my own version of getSignedUrl, which is not what I want to be spending time on).

from nodejs-storage.

lukesneeringer avatar lukesneeringer commented on July 16, 2024

From @stephenplusplus on April 24, 2017 14:41

Okay, thanks for finding a solution. Would you mind sending a PR? If we accepted a resumable option, it could default to specifying the correct header and action value.

from nodejs-storage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.