I just downloaded ipfs and booted up a daemon. Fascinating software!!
I can see that Iām connected to 500+ peers around the world. If I add a file, will it be viewable to other peers, or only to those who have the address to the file?
When the file is added, is the data physically distributed or does it remain on my machine until others download a copy?
How can I view which files Iām hosting or delete files that Iāve added?
Only those that have multihash for the file.I think there might be a way for people to monitor DHT traffic to find out which hashes your node is telling the DHT that you have, so I wouldnāt assume that anything added to IPFS with default settings is private.
It remains on your machine until others download a copy.
You can view items that youāve pinned using ipfs pin ls (I typically use the --type=recursive option to only show things Iāve deliberately pinned.
If you want to remove any files that youāve pinned you can do ipfs pin rm <multihash>. To remove anything youāve downloaded but not pinned you can run the garbage collector using ipfs repo gc. Iām not sure if thereās a way or not to remove individual hashes that havenāt been pinned but have been cached on your node (without running the garbage collector).
Good to know. So, I suppose you would want to encrypt any data that was to be shared within a smaller group of trusted nodes, if any files added with the āipfs addā command are publicly viewable with a bit of snooping.
The ipfs pin add command has the description āStores an IPFS object(s) from a given path locally to disk.ā while the ipfs get command has the description " Stores to disk the data contained [in] an IPFS or IPNS object(s) at the given path." These sound fairly similar.
Is it only the pin command that downloads a copy of an object to re-distribute upon subsequent peer requests?
Alsoā¦ If I upload a folder, say of a website, then I want to update a few files in that folder, how would I go about updating those files, and how would I keep a reference pointing to the newest version of that folder?
ipfs pin add will add the data into IPFSā local repository and pin it. ipfs get will download the file into your local filesystem and also cache it in the IPFS repo (but not pin it, so it could be garbage collected).
By default, doing an ipfs pin add, ipfs get or otherwise requesting content through IPFS will also make you a provider of the content. Pinning it just prevents the content from being garbage collected and will help ensure that the pinned content will remain alive on the network.
This can be done using IPNS. See the example below for some more information, but basically IPNS allows you to point a fixed IPNS address to an IPFS hash and publish new IPFS hashes to the fixed address over time as changes are made.
Hi - I am the same just started, I have uploaded a mp3 file thatās l an old song written by me in 1973 to play C&P the url in a new tab then it should play let me know -