This article was first published on Stories by TRON Foundation on Medium
Add a File
Run the btfs add command:
Get a File
Run the btfs get command:
In the default configuration, BTFS nodes garbage collect their cache when the storage exceeds the max capacity threshold set in the configuration file. Pinned files, however, are exempt from the garbage collection process.
You can also publish the uploaded file for your local BTFS node to host:
Check your local BTFS node’s peer ID to see which file is hosted:
View your hosted file through the gateway at https://gateway.btfssoter.io/btns/<PeerID>.
Domain binding allows you to display the hosted file path as a standard URL domain rather than the peer ID of your BTFS node. For example, assuming you own “www.heart.com", domain binding allows you to create a URL path like https://gateway.btfssoter.io/btns/heart.com/.
To bind the domain, the domain DNS settings must be changed by adding a DNS TXT record of the form “dnslink=/btfs/<peerID>”.
To keep reading, please go to the original article at:
Stories by TRON Foundation on Medium