Skip to content

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

@margox

Description

@margox

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions