File sharing steps in IPFS
After the installation process, open the IPFS software and follow these steps to transfer files:
- In IPFS, go to the left-hand side and click on the Files section, then click on the Import button (to import and upload your files from your local system to the IPFS network).
You can upload files or folders according to your choice.
- One image is uploaded from the local file directory and there you can see the green tick mark, which shows that the file is successfully uploaded to the network.
- Click on the three dots on the right-hand side, a drop-down menu will appear.
- Now, if you want to share this image file with any of your friends, you can either copy the share link or copy the CID address and give it to your friend. Your friend can then paste this CID on the IPFS browser to get the image.
- If you copy the link and paste it in the browser, then you can get the downloaded file.
- Here, we can copy the link. In this link, CID is something which always starts from Qm………..
- So, in conclusion, we required CID (Content Identifier), which is the unique cryptographic hash of each file. We can request the particular node that contains the file that we want and get the CID through it. This will help us access the file and download it to our local system.
How to Share File in IPFS Blockchain?
IPFS stands for Interplanetary File System. It is a distributed peer-to-peer network and a protocol for organizing, storing and sharing files and data. It works on the blockchain principle as IPFS itself is a decentralized file system on a distributed network. So, before moving ahead with the file transfer mechanism in the IPFS network and directly understanding the procedure of file transfer, we should first understand in brief about the IPFS and its terminology, which will help us understand the mechanism easily and how it actually works.
What is IPFS?
The IPFS protocol not only helps us to store or share files, but it also helps us to track new modifications or versions done on a file over a distributed network, just like on open source platforms. In IPFS, if a person’s system is connected to a network or is an IPFS node, then any changes or edits to the file done by one node are seen by all other nodes because every file has its own unique hash, just like blockchain, so it also provides transparency to the data.
Through out the article of understanding the file transfer procedure, we will be covering the following headings and before moving ahead we must be aware of these followings:
- IPFS node
- Hashing system of IPFS
- Working mechanism of file sharing on IPFS
- IPFS software installation Process
- Working of IPFS
- File sharing steps in IPFS
- Asymmetric IPFS Encryption
- Uses of IPFS
- Who is using IPFS
- Conclusion
So, let’s begin with IPFS node.
IPFS Node
It is basically a machine or a computer system that runs IPFS software in it and is connected to the IPFS network to store, share and retrieve data from the IPFS network of many nodes. Many IPFS nodes of a computer system that runs IPFS software in them make an IPFS peer-to-peer network in which files are shared and retrieved from one node to another node throughout the network and data is maintained by all nodes of the network.
What is Hashing System in IPFS?
Unlike the traditional system of data transfer over the internet, which uses many centralized protocols (ex. HTTP or HTTPS), whose job is to send requests for accessing a client’s data to a server and then retrieve data from the server for the client, IPFS uses the Content Addressing system rather than the Location Addressing system (used in HTTPS).
In Content Addressing system, the content or the data itself acts as an address for its location or its referencing. In IPFS, each piece of data is stored using a unique distributed Hashing system and we can say that content stored or organized in an IPFS network is based on its unique cryptographic hash rather than its location.
Cryptographic Hashing is performed using a special hashing algorithm called as SHA-256. Each file is identified by the unique hash allotted to it and this hash is used while transferring of files between the nodes. This unique cryptographic hash of each file is known as the Content Identifier (CID).
A cryptographic hash is the unique identity of a file stored on the IPFS network.