Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Ability to read offsets #348

Closed
mikeal opened this issue Jul 6, 2016 · 4 comments
Closed

Ability to read offsets #348

mikeal opened this issue Jul 6, 2016 · 4 comments
Labels
exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue P1 High: Likely tackled by core team if no one steps up

Comments

@mikeal
Copy link
Contributor

mikeal commented Jul 6, 2016

In order to do video playback properly I need to be able to seek through parts of a file.

So, what I basically need is a version of ipfs.cat that has offset support. Something like:

ipfs.seek(hash, offset, length, (err, exporter) => {
  if (err) throw err
  exporter.pipe(destinationStream)
})
@mikeal
Copy link
Contributor Author

mikeal commented Jul 6, 2016

It could also be called "range" if you want to match the http terminology.

@dignifiedquire
Copy link
Member

I agree this would be really nice to have. There is some ground work to be done in the code, but it's very much possible to do (go-ipfs already supports this on the gateway, but not exposed through the api)

@daviddias
Copy link
Member

@dignifiedquire it is exposed on the Files API (ipfs files read --offset), but that requires moving the file to mfs, like:

> ipfs add file.txt
QmHash
> ipfs files cp /ipfs/QmHash /file.txt
> ipfs files read /file.txt --offset=200

This is related with the convergence of Files with the basic unixfs commands ipfs/specs#98 (comment)

@daviddias daviddias added status/ready Ready to be worked and removed js-ipfs-backlog labels Dec 5, 2016
@daviddias daviddias added status/deferred Conscious decision to pause or backlog and removed status/ready Ready to be worked labels Jan 29, 2017
@daviddias daviddias added exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue status/ready Ready to be worked and removed status/deferred Conscious decision to pause or backlog feature labels Sep 12, 2017
@daviddias daviddias added the P1 High: Likely tackled by core team if no one steps up label Oct 18, 2017
@daviddias
Copy link
Member

This now exists thanks to @achingbrain \o/ Check https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#filescat for details

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue P1 High: Likely tackled by core team if no one steps up
Projects
None yet
Development

No branches or pull requests

4 participants