5 Ways To Use IPFS For File Sharing and Storage

3
minute read

It’s no secret that IPFS, a decentralized peer-to-peer file storage protocol, has become one of the most commonly used methods used for storing files and digital assets within the Web3 ecosystem. Here’s why:

All data is public: Files or folders uploaded to IPFS are publicly accessible through their unique content identifier (CID) value. They can be accessed by anyone in the world through a variety of methods, like using an IPFS native URL or using an IPFS gateway URL. That means there’s no management of file permissions, no account management, and no limitations like vendor lock-in. 

Decentralized: IPFS is decentralized, which means that it does not rely on a traditional centralized server to store and distribute files, making it more resistant to downtime, as there is no central point of failure.

IPFS CIDs are immutable: Each file or folder uploaded to IPFs is given a unique CID value generated based on the file or folder’s cryptographic hash value. Any change to its contents or metadata will result in a new CID value when the file is re-uploaded to IPFS. This means that files can be verified for authenticity through their CID values. 

Highly Performant: IPFS uses a distributed hash table (DHT) to locate and retrieve files quickly and efficiently.

IPFS is a powerful and efficient file-sharing and storage system that offers many benefits over traditional client-server systems. Currently, it's primarily used within the Web3 ecosystem, Web2 projects and tools can benefit from using IPFS as well. 

Here are 5 ways to use IPFS for file sharing and storage:

Sharing Verified Documents


Documents uploaded to IPFS can be verified for their authenticity based on the file’s IPFS CID value. Each CID value is a cryptographic value that is generated based on the file’s content and metadata. If the document had been changed at all and re-uploaded to IPFS, it would use an entirely different CID value. Since all data on IPFs is public, sharing documents is as simple as providing the recipient the CID value that they can use to access the file. 

Uploading Embedded Website Assets


For files that are embedded on webpages, such as image or video files, using IPFS prevents these assets from being a victim of link rot. Link rot refers to when a traditional URL that uses HTTPS location addressing no longer works due to a change in the URL’s file path. Any small change to the URL will break the original link unless a URL redirect is configured. 

IPFS uses content addressing, where content is located based on its CID value. Content addressing doesn’t rely on URLs to remain the same or for domains to stay active - as long as a CID is available on the IPFS network, the content can be accessed.

If IPFS is used for hosting assets that are embedded on webpages, it can assure that those assets are accessible and available on the website. 

Sharing Files with Dedicated IPFS Gateways


Since CIDs aren’t human-readable values, files that are frequently shared amongst potentially hundreds or thousands of recipients can benefit from being accessed using a human-readable URL. 

That’s where dedicated IPFS gateways come in. Dedicated IPFS gateways through Filebase can be scoped to a specific IPFS folder or file as the ‘root’ asset. Through this setup, files can be accessed through a URL such as:


http://documentation.myfilebase.com/
—>

which in this configuration, returns the following one-pager document:

You can learn more about our dedicated IPFS gateways here.

Sharing Entire Folders of Content


IPFS supports hosting entire folders of content that can be accessed through a single CID value. These folders can contain thousands of files that are verified to be authentic in the same manner that individual files are. Each folder’s CID is generated in the same way that individual CIDs are generated, meaning that any change to the folder’s contents would result in a new, unique CID value. Since all CIDs are public, there aren’t any permissions to manage or accounts to maintain. 

Archiving Public Documents and Records


IPFS can be a great option for archiving public record documents, such as property records or census documents, as these are already public on the web, but like other content stored with location addressing, they can be subject to being lost due to link rot. To prevent this, these documents can be stored on IPFS where they can be verified to be authentic but also safe for long-term preservation.

However, if these documents are not pinned to IPFS, they will be removed during the periodic garbage collection process. IPFS pinning refers to storing a file or folder on an IPFS node’s permanent storage, instead of within the node’s cache storage. If a file isn’t pinned, it’s only stored in cache storage that will be cleared periodically by the network’s resource management process. 

Filebase is a geo-redundant IPFS pinning service that pins each file uploaded to IPFS through Filebase with 3x replication across different diverse geographic locations. This 3x replication provides vital redundancy and reliability that ensures CIDs are always accessible and available. 

You can sign up for a free Filebase account to get started 

If you have any questions, please join our Discord server, or send us an email at hello@filebase.com.

share on

It’s no secret that IPFS, a decentralized peer-to-peer file storage protocol, has become one of the most commonly used methods used for storing files and digital assets within the Web3 ecosystem. Here’s why:

All data is public: Files or folders uploaded to IPFS are publicly accessible through their unique content identifier (CID) value. They can be accessed by anyone in the world through a variety of methods, like using an IPFS native URL or using an IPFS gateway URL. That means there’s no management of file permissions, no account management, and no limitations like vendor lock-in. 

Decentralized: IPFS is decentralized, which means that it does not rely on a traditional centralized server to store and distribute files, making it more resistant to downtime, as there is no central point of failure.

IPFS CIDs are immutable: Each file or folder uploaded to IPFs is given a unique CID value generated based on the file or folder’s cryptographic hash value. Any change to its contents or metadata will result in a new CID value when the file is re-uploaded to IPFS. This means that files can be verified for authenticity through their CID values. 

Highly Performant: IPFS uses a distributed hash table (DHT) to locate and retrieve files quickly and efficiently.

IPFS is a powerful and efficient file-sharing and storage system that offers many benefits over traditional client-server systems. Currently, it's primarily used within the Web3 ecosystem, Web2 projects and tools can benefit from using IPFS as well. 

Here are 5 ways to use IPFS for file sharing and storage:

Sharing Verified Documents


Documents uploaded to IPFS can be verified for their authenticity based on the file’s IPFS CID value. Each CID value is a cryptographic value that is generated based on the file’s content and metadata. If the document had been changed at all and re-uploaded to IPFS, it would use an entirely different CID value. Since all data on IPFs is public, sharing documents is as simple as providing the recipient the CID value that they can use to access the file. 

Uploading Embedded Website Assets


For files that are embedded on webpages, such as image or video files, using IPFS prevents these assets from being a victim of link rot. Link rot refers to when a traditional URL that uses HTTPS location addressing no longer works due to a change in the URL’s file path. Any small change to the URL will break the original link unless a URL redirect is configured. 

IPFS uses content addressing, where content is located based on its CID value. Content addressing doesn’t rely on URLs to remain the same or for domains to stay active - as long as a CID is available on the IPFS network, the content can be accessed.

If IPFS is used for hosting assets that are embedded on webpages, it can assure that those assets are accessible and available on the website. 

Sharing Files with Dedicated IPFS Gateways


Since CIDs aren’t human-readable values, files that are frequently shared amongst potentially hundreds or thousands of recipients can benefit from being accessed using a human-readable URL. 

That’s where dedicated IPFS gateways come in. Dedicated IPFS gateways through Filebase can be scoped to a specific IPFS folder or file as the ‘root’ asset. Through this setup, files can be accessed through a URL such as:


http://documentation.myfilebase.com/
—>

which in this configuration, returns the following one-pager document:

You can learn more about our dedicated IPFS gateways here.

Sharing Entire Folders of Content


IPFS supports hosting entire folders of content that can be accessed through a single CID value. These folders can contain thousands of files that are verified to be authentic in the same manner that individual files are. Each folder’s CID is generated in the same way that individual CIDs are generated, meaning that any change to the folder’s contents would result in a new, unique CID value. Since all CIDs are public, there aren’t any permissions to manage or accounts to maintain. 

Archiving Public Documents and Records


IPFS can be a great option for archiving public record documents, such as property records or census documents, as these are already public on the web, but like other content stored with location addressing, they can be subject to being lost due to link rot. To prevent this, these documents can be stored on IPFS where they can be verified to be authentic but also safe for long-term preservation.

However, if these documents are not pinned to IPFS, they will be removed during the periodic garbage collection process. IPFS pinning refers to storing a file or folder on an IPFS node’s permanent storage, instead of within the node’s cache storage. If a file isn’t pinned, it’s only stored in cache storage that will be cleared periodically by the network’s resource management process. 

Filebase is a geo-redundant IPFS pinning service that pins each file uploaded to IPFS through Filebase with 3x replication across different diverse geographic locations. This 3x replication provides vital redundancy and reliability that ensures CIDs are always accessible and available. 

You can sign up for a free Filebase account to get started 

If you have any questions, please join our Discord server, or send us an email at hello@filebase.com.