Using Fission Drive to Serve Files

Fission Drive is the default app for managing files stored in WNFS. You can also use Fission Drive and WNFS to serve files to websites that only need to consume public files.

This demo app shows how to serve images stored in WNFS using Fission Drive. See the Using Fission Drive to Serve Files forum post for more details on this technique.

One image

A single image retrieved from a public link like https://${username}.files.fission.name/p/${path_to_file}. For example, here is UCAN Sam retrieved from https://demouser.files.fission.name/p/Art/UCAN Sam.png.

All images in a directory

We can also get a listing of images in a directory to display them all. IPFS gateways provide an endpoint that returns a directory listing if we have the directory's content identifier (CID). On Fission, the endpoint is https://ipfs.runfission.com/api/v0/ls/${CID}.

The CID for a directory can be copied from Fission Drive by right-clicking on the directory and selecting "Copy CID".

If we fill in the CID and make a GET request to the endpoint, the IPFS gateway responds with a directory listing. We can now make a public link for each file in the directory.


More Info