3

I'm running an in browser instance of js-ipfs on a web page. When a user clicks an upload button, they can select a file which will then be added to the IPFS node. I've disabled automatic pinning in my .add() call by passing {pin: false}. I've confirmed that the node is not pinning the file by calling ipfs.pin.ls() and seeing an empty array.

However, if I .cat() the file hash on another computer, I am able to retrieve it.

I've made sure that these are not files that have been uploaded before by generating new screencasts in Quicktime.

What's going on? I thought files needed to be pinned in order to be accessible? Or is my file going to some intermediary gateway first?

user339946
  • 5,961
  • 9
  • 52
  • 97

1 Answers1

2

When you add a file, it's still cached locally for some time, namely until the garbage collector runs. pin just adds hashes to a "do not garbage collect" list. This is likely the effect you're seeing.

I've also heard reports of the official gateway, which you connect to by default, pre-loading added content for faster retrieval, so it could have been cached there as well.

npfoss
  • 423
  • 5
  • 14