IPFS file not downloading

3.5k Views Asked by At

I am using ipfs to share files with other users, I upload it and then stop the ipfs daemon. So, ideally the file should have been distributed across other peers and downloadable to the recipient user irrespective of the fact whether the sender machine is running the ipfs daemon or not. Is there a latency here or am I missing something?

4

There are 4 best solutions below

0
On BEST ANSWER

I think you should take help from the link mentioned below:

https://medium.com/@JohnZettler/how-to-save-a-file-on-ipfs-a-7-step-primer-3476469536c7

After reading this you will get idea how to add, pin and retrieve data from ipfs. I hope it will help you.

0
On

A few other things to check:

Does your IPFS daemon have peers? You may be able to check this after running ipfs daemon by going to:

http://127.0.0.1:5001/

If everything seems fine but the data just seems to stall out...my experience is that it will be there the following morning. For some reason it just acts like nothing is going on and sometimes you have to wait.

AFAIK if you are the one pinning the file you should in fact leave the daemon running.

Hopefully at some point there will be a command we can run to check when a download should be ready.

0
On

Files do not get distributed automatically. They remain solely on your node until either other nodes requests it, you use an external pinning service, or you setup your own IPFS Cluster to distribute content over several nodes under your control. If the content exists only on your node (ie, no one else on the network has actively requested/downloaded the content), then taking your node offline will mean that your content is unavailable on the IPFS network (until your node is back online).

Note that pinning something on your own node ensures the pinned file stays available to the IPFS network from your node, however it does not push it out, so if your node goes down and noone has requested your file, it is no longer actively on the network. It might be helpful to think of 'pinning' as simply preventing the garbage collector from deleting content when it cleans things out.

(Just to clarify, non-pinned files are also available to the IPFS network, the difference is that they are eligible for deletion by the garbage collector)

You can couple pinning with external pinning services, which in effect is a 3rd party node agreeing to pin your content on their node for a set period.

0
On

I think something the medium article is missing to explain and I would rather consider relevant.

In the example explained in the article, it is mentioned that Protocol Labs provides a set of Bootstrapping Nodes which scrap the network looking for new files in order to make your files available once you IPFS daemon is down you first need to access to https://ipfs.io/ipfs/[yourHash].

There are two important details we also need to understand about that. First, our files are being distributed only by the peers who downloaded the file before, that is why when you access to https://ipfs.io/ipfs... the bootstrapping nodes download the file from your machine into theirs and new providers of your file, in the same way, if it was me who requested the access to your file I would become also a source node of your file. Secondly, we need to know that that does not mean your file will be available forever, there is an underline service which will clean up files not accessed for a period of time in order to optimize disk usage, therefore at some point, your file will become not available unless your local daemon is running.

Another scaring fact regarding IPFS is that once your file is distributed over the network you will lose control over who is accessing to them. In my team, we are working on improving IPFS by adding an ACL layer to enable file owners to decide who has access to their files and can revoke the access at any time. If you are interested in this, feel free to take a look at our wiki