Comments (6)
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.
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.
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.
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.
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.
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)
- How to Add custom value for the header `x-goog-api` using the module google cloud storage? HOT 2
- refactor!: Revamp `apiEndpoint` HOT 1
- Implement soft delete
- Error: Cannot find module 'node:url' HOT 2
- storage acls buckets: should make a bucket public failed HOT 3
- storage requester pays existing bucket methods that accept userProject: file#createReadStream failed HOT 2
- storage requester pays existing bucket methods that accept userProject: file#getMetadata failed HOT 2
- cloud storage is authenticated but still cannot use it HOT 3
- Add object retention samples
- storage requester pays existing bucket methods that accept userProject: file#exists failed HOT 1
- Missing / undocumented feature in File.getSignedUrl() HOT 10
- Clarify the limitation message associated with bucket signed URLs
- storage HMAC keys: should get metadata for an HMAC key failed HOT 5
- storage HMAC keys: should make the key INACTIVE failed HOT 2
- File.publicUrl() unexpectedly escapes forward slashes in > 7.6.0 HOT 11
- storage HMAC keys: should delete the key failed HOT 3
- How to list the subdirectories/subfolders in a folder HOT 3
- storage public access prevention enforced public access prevention behavior: object cannot be made public via ACL failed HOT 3
- how to access storage with impersonated token? HOT 3
- what is the page limit of getFiles with autoPaginate=false HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodejs-storage.