Skip to content

feat: download from SP returns uploaded file rather than CAR #24

@SgtPooki

Description

@SgtPooki

pulled from figma comment

As a result, in the browser we'll need to fetch https://$spdomain/piece/$filecoinPieceCid, which gives us the CAR that was uploaded. The CAR then needs to be process by JS car library and JS triggers a file save to the OS for "filecoin-corgi.png".

We should be able to do stream the download from the SP into a car reader, which then transforms parsed content for the file, and then stream the actual content bytes with proper filetype are streamed to the users machine.

There will likely be some intermediary memory usage growth while parsing the car and then walking the dag for cars containing multiple files. (we could use indexeddb blockstore to cache this for this usecase?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    team/filecoin-pin"Filecoin Pin" project is a stakeholder for this work.team/fs-wgFOC working group is a stakeholder for this work, and thus wants to track it on their project board.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions