-
Notifications
You must be signed in to change notification settings - Fork 597
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
Figure out how to do browser-based uploading, and document it well. #641
Comments
I made a couple of examples here showing two different ways to handle uploads. https://github.com/stephenplusplus/gcloud-upload-example |
Thanks alot!! I just added that but now I'm trying to download a file using app.get('/file/:imageId', function(req, res){ var remoteFile = bucket.file(req.params.imageId); var src = remoteFile.createReadStream() src res.attachment(localFilename); }) but for larger files I just get about 1.2 mb downloaded.. 2015-09-17 1:27 GMT+02:00 Stephen Sawchuk notifications@github.com:
|
Which version of gcloud are you running? |
2015-09-17 15:28 GMT+02:00 Stephen Sawchuk notifications@github.com:
|
Hmm, I haven't been able to reproduce. How large are the files you're having trouble with? I've tried with a 10MB file without issues. I added onto the example with some options of how to download files: https://github.com/stephenplusplus/gcloud-upload-example/blob/1d6cbecb31aa2dcd98d1c8177e6c474b80b5d1f5/server.js#L89 |
about 300mb, and the files will probably be up to some gb's 2015-09-17 16:16 GMT+02:00 Stephen Sawchuk notifications@github.com:
|
Would you mind opening a new issue about this? Also, please test that it still doesn't work isolated from express, e.g.: remoteFile.createReadStream().pipe(fs.createWriteStream('./backup-file')) |
I think we've got this one covered with Related, I just stumbled upon this project over the weekend: https://github.com/makeomatic/ms-files-gce If there's more we can do, let me know! |
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>
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>
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | devDependencies | major | [`^7.0.2` -> `^8.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/7.0.2/8.0.0) | --- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-dialogflow).
## Code fencing Code examples need code fencing around them to distingish from rich text for TSDoc. Internally b/179483748 Script used: https://github.com/fhinkel/cloud-rad-script/blob/main/fixExampleComments.js
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Benjamin E. Coe <bencoe@google.com>
* chore: updated samples/package.json [ci skip] * chore: updated CHANGELOG.md [ci skip] * chore: updated package.json Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* chore: updated samples/package.json [ci skip] * chore: updated CHANGELOG.md [ci skip] * chore: updated package.json Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
So there's this concept of "browser-based uploads" which basically is the following process:
file
which is10mb
and has metadata ={...}
).So... a couple of questions:
Note that we're not wiring together any RPCs or anything. Just providing a method that takes a policy and spits back a signature for the user to serialize and send around however they want.
upload
(or similar) using the policy document and signature.The code I'm expecting here would look like...
Server-side:
Client-side:
/cc @Capstan
The text was updated successfully, but these errors were encountered: