Added `english` / `spanish` tags and added `english` tag to template
1.3 KiB
tags |
---|
tutorial, ipfs, file-sharing, nat, english |
Share file with ipfs
Warning: Only tested serving the file, not downloading it
-
Initiate ipfs main folder
ipfs init
, not sure why but this is required for following commands -
Serve a file
ipfs add {filepath}
. It should return something like thisadded QmdsEVLRXioANssEVLRXYioANsGtANsGtRXYioANsGtAWZ file.md 37.62 KiB / 37.62 KiB [===========================] 100.00%
-
Start server with
ipfs daemon
-
Missing step, server seems to need an open port (not firewalled)
-
Download file from any device
ipfs get /ipfs/QmdsEVLRXioANssEVLRXYioANsGtANsGtRXYioANsGtAWZ
<-- that's the hash returned from step 3$ ls QmdsEVLRXioANssEVLRXYioANsGtANsGtRXYioANsGtAWZ
Notice the filename is just the hash, the original filename is lost.
Note: IPNS seems to solve the filename problem, need to research on how to use it
Troubleshoot
https://github.com/ipfs/go-ipfs/blob/master/docs/file-transfer.md
What led to learning this
Random news of ipfs in HN. It just reminded me I've never tried it out.
And in recent months I've had difficulty sharing files p2p