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

Implement the io.ReadSeeker interface for the ObjectResult type #1508

Open
adoublef opened this issue Dec 26, 2023 · 0 comments
Open

Implement the io.ReadSeeker interface for the ObjectResult type #1508

adoublef opened this issue Dec 26, 2023 · 0 comments
Assignees
Labels
proposal Enhancement idea or proposal

Comments

@adoublef
Copy link

Proposed change

As a user I want to be able to made HTTP Range Requests to the server for large byte data that is persisted in the NATS object store. The official Go std lib offers a method http.ServeContent which is recommended over io.Copy as it:

handles Range requests properly, sets the MIME type, and handles If-Match, If-Unmodified-Since, If-None-Match, If-Modified-Since, and If-Range requests.

This requires the content to have the Seek which currently the ObjectResult does not therefore it can't yet benefit from this standard method

Use case

Partial requests for large data can be useful for streaming large content like video. This gives the client (assuming web client) greater flexibility with caching downloads, efficiency with parallel requests to name a few.

Contribution

If I learn that this could be possible, I would be keen to contribute.

@adoublef adoublef added the proposal Enhancement idea or proposal label Dec 26, 2023
@piotrpio piotrpio self-assigned this Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Enhancement idea or proposal
Projects
None yet
Development

No branches or pull requests

2 participants