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: support tail bytes #700

Merged

Conversation

stephenplusplus
Copy link
Contributor

Fixes #420

Currently, with start and end, a user can read a byte range from a file:

file.createReadStream({ start: 0, end: 100 }) // request.headers.Range: bytes=0-100

They can leave out start: 0, as that's the default:

file.createReadStream({ end: 100 }) // request.headers.Range: bytes=0-100

The API also allows reading tail bytes, but we don't have a way to express that. We talked about options in #420, and this PR implements what I think may be the most straightforward:

file.createReadStream({ end: -100 }) //  // request.headers.Range: bytes=-100

@stephenplusplus stephenplusplus added the api: storage Issues related to the Cloud Storage API. label Jul 1, 2015
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 1, 2015
stephenplusplus added a commit that referenced this pull request Jul 1, 2015
@stephenplusplus stephenplusplus merged commit 0dacd2d into googleapis:master Jul 1, 2015
sofisl pushed a commit that referenced this pull request Nov 10, 2022
🤖 I have created a release \*beep\* \*boop\*
---
### [6.2.6](https://www.github.com/googleapis/nodejs-translate/compare/v6.2.5...v6.2.6) (2021-07-21)


### Bug Fixes

* Updating WORKSPACE files to use the newest version of the Typescript generator. ([#699](https://www.github.com/googleapis/nodejs-translate/issues/699)) ([41e7ba3](https://www.github.com/googleapis/nodejs-translate/commit/41e7ba31041a2138c7068ce0e14528d044cb3606))
---


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 pull request Nov 17, 2022
* fix: fix breaking changes in Compute API (#701)

Source-Link: googleapis/googleapis@272c110

Source-Link: googleapis/googleapis-gen@4c674ff
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGM2NzRmZjZmZGIyYmE1OGVmY2M0ZTc5Y2RkODIyNGI2ZTA0ZGE5NCJ9

Merge branch 'owl-bot-copy' of https://github.com/googleapis/nodejs-compute into owl-bot-copy

🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

feat: update compute API to revision 20220112 (#700)

Source-Link: googleapis/googleapis@249e9a1

Source-Link: googleapis/googleapis-gen@1f2c41b
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWYyYzQxYmJmZTA5NzYxNmNlYjFlOWZiNjc4NzJhNmJiMWRjNTlkNCJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot

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>
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. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants