-
Notifications
You must be signed in to change notification settings - Fork 91
Is there any way to get data as a steam? #867
Description
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.