Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

The file added by node.js can't be get/cat on other nodes #957

Closed
kappabooom opened this issue Aug 25, 2017 · 6 comments
Closed

The file added by node.js can't be get/cat on other nodes #957

kappabooom opened this issue Aug 25, 2017 · 6 comments
Labels
kind/support A question or request for support

Comments

@kappabooom
Copy link

kappabooom commented Aug 25, 2017

  • Version: 0.25.1
  • Platform:mac osX
  • Subsystem:

Type: Question

Severity: Medium

Description: I can't find the file that I added by node.js, I used to get the file by

node1 -> ipfs.io gateway (use https://ipfs.io/ipfs/--hash--) -> node2
but when I use this way to transfer files previous times, I failed.
I can't cat my files on the ipfs.io gateway(use https://ipfs.io/ipfs/--hash--)
Is there other way to transfer files from node1 to node2 by hash, or has some tips to solve my problem?
I want to use a node to add files and another node to get files on the node.js
thanks!!!!!

Steps to reproduce the error:

@kappabooom kappabooom changed the title he file The file added by node.js can't be get/cat on other nodes Aug 25, 2017
@daviddias
Copy link
Member

daviddias commented Aug 25, 2017

@kappabooom I'm not sure if I understood fully your question, but if I did, your answer is on the Project Status - https://github.com/ipfs/js-ipfs#project-status

Essentially, until we have DHT fully working -- #856 -- you have to be the one connecting the nodes directly.

@daviddias daviddias added the kind/support A question or request for support label Aug 25, 2017
@kappabooom
Copy link
Author

@diasdavid thanks, did you mean that if I want to get files from another node, I need to connecting to the node first? is there an example, because I'm not sure if I fully understood your reply QQ

@kappabooom
Copy link
Author

besides, when I run the example(https://github.com/ipfs/js-ipfs/tree/master/examples/ipfs-101).
while I change the 'hello.txt' in 1.js by another txt, I won't cat the new file. Is it means that I can't add files to IPFS network currently?

@daviddias
Copy link
Member

@kappabooom I think you are trying multiple cases there and finding a couple of caveats.

js-ipfs doesn't run the DHT by default, the DHT is the secret sauce that enables IPFS to find content on the network seamlessly.

js-ipfs will try to find other nodes and will connect to the gateways, so any content that is on the gateway is discoverable.

For example, If you boot 2 js-ipfs nodes in the browser, you will be able to exchange data between them because will discover each other and dial through WebRTC.

Follow the DHT PR for more updates :)

@kappabooom
Copy link
Author

@diasdavid thanks for your reply :) I am more clear about DHT and js-ipfs.
But I still have some trouble on use example ipfs-101

@daviddias
Copy link
Member

@kappabooom the issue you had with 101 was due to #973 (the infrastructure of IPFS changed), now that is fixed with 0.25.4 release. Have fun! :)

MicrowaveDev pushed a commit to galtproject/js-ipfs that referenced this issue May 22, 2020
* feat: add support for js-ipfs dag api and also some tests

* test: move tests to interface suite

* chore: update interface-ipfs-core dep

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>

* chore: update interface-ipfs-core

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/support A question or request for support
Projects
None yet
Development

No branches or pull requests

2 participants