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

Is there any way to get data as a steam? #867

Open
margox opened this issue Nov 5, 2021 · 0 comments
Open

Is there any way to get data as a steam? #867

margox opened this issue Nov 5, 2021 · 0 comments

Comments

@margox
Copy link

margox commented Nov 5, 2021

We are building a file storage system (website) based on Powergate, it's great and everything works well except one thing: when a user downloading a file which he uploaded before, on server side, we call the powerGate.data.get(cid) to retrieve the whole file to the disk of the server, then stream it to the brower or any other kind of client, the flow worked, but the user has to wait and wait ... until the server begins the download streaming, and later I found another solution: getting the data from IPFS gate way:

http.get(`${IPFS_GATEWAY}/ipfs/${cid}`, (response) => {
  ctx.body = response
})

but this solution works for hot storage only.

So is there any way to get the data stream with powergate? then I dont have to wait the server to retrieve the whole file first, the users will be happy too, or If I can get the retrieving progress, it's also good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant