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

How do I know the progress of getting a large file #1394

Closed
xuruijing opened this issue Jun 12, 2018 · 2 comments
Closed

How do I know the progress of getting a large file #1394

xuruijing opened this issue Jun 12, 2018 · 2 comments
Labels
kind/support A question or request for support

Comments

@xuruijing
Copy link

files.get or files.cat . How do I know the progress of getting a large file(video or image). The optional parameters described in the document are offset and length.

@alanshaw alanshaw added kind/support A question or request for support status/ready Ready to be worked labels Jun 18, 2018
@alanshaw
Copy link
Member

This is not currently spec'd and is not implemented in js-ipfs or go-ipfs implementations. @diasdavid do you know if this is planned/possible?

Note that if you catReadableStream or catPullStream you'll know how much you have as you get streamed chunks, but you'll not know the total file size.

You can probably use object.stat to get the total size beforehand but in the future hopefully files.stat will support both MFS as well as IPFS path and you'll be able to use that.

@daviddias
Copy link
Member

Nothing planned but this seems like good feedback for https:/ipfs/interface-ipfs-core/issues/284. Thanks for bringing it up, @xuruijing

@ghost ghost removed the status/ready Ready to be worked label Jun 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/support A question or request for support
Projects
None yet
Development

No branches or pull requests

3 participants