All Fission users have a webnative file system. Apps store user data in public and private namespaces in this filesystem.
Files stored in the public namespace are available on the web through a couple of types of links:
- Public links always link to the latest version of a file
- Archival links permanently link to one version of the file
Webnative can help you generate public and archival links when your app creates or modifies a file. You can also generate links to older versions of a file.
Public links are easy to share and remember, and they always link to the latest version of a file.
All Fission users have a custom domain name. Public links use this custom domain name and
/p/ to link to a user’s public files:
For example, if the user
fission wanted to link to a
shared.txt in their public folder, the link would be:
Even if they edit that file multiple times, this link will always work. This is an easy way to share all sorts of things – including public #apps:tiddlywiki sites, HTML pages, or a link to a PDF.
Archival links permanently link to one version of a file. These links are great when you need a permanent record of a file.
Each time webnative creates or modifies a file, a content identifier representing the current state of the user’s filesystem is created. You can think of this as an identifier for a snapshot of the filesystem. This identifier is called a root CID.
Archival links use the root CID,
/p/ for “pretty path”, and the path to the file:
If we were linking to
shared.txt then each time you edited it, the root CID would change. Using an Archival Link you can be sure that you are sharing the exact file contents at the time you are sending it.
Webnative keeps a history of each version of a file. You can use Versions to access older versions and create links to them.
Versioned links use a CID for the version of the file.
Note there is no “p” here. This is linking directly into the WNFS file system, skipping the metadata layer, and as such this is intended for developer use, and isn’t really user friendly. This is linking directly to a file version (which could also be an encrypted, private file), unlike Archival Links which capture the entire file path of the public tree, including metadata.
A Note About Permalinks
Permalink can mean a link to content that might change or a permanent link to content. Webnative gives you the option to use public links or archival links, depending on your needs.
Public links are great for linking to dynamic content. Archival links are useful when you need to guarantee that the content has not and will not change.