Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

文件在 ipfs.io 访问不了 #971

Closed
vioulo opened this issue Feb 23, 2019 · 6 comments
Closed

文件在 ipfs.io 访问不了 #971

vioulo opened this issue Feb 23, 2019 · 6 comments

Comments

@vioulo
Copy link

vioulo commented Feb 23, 2019

  1. 我在 webui 文件里面添加了一个文件,现在它不能在 ipfs.io 里面访问到了,是我哪里做的不对吗?文件地址是 https://ipfs.io/ipfs/QmUVX5y1s11MRQFrYP1SJaMm1gGWUBmNjsA1JkHd3VkHvM
  2. 添加的文件是不是都需要经过 ipfs.io 来访问,可是不挂梯子,我连 ipfs.io 都访问不了;我提交的文件,别人可以不通过 ipfs.io 来获取吗?
@fsdiogo
Copy link
Contributor

fsdiogo commented Feb 25, 2019

Hey @vioulo, please state the issue in english so we can help 🙏

@alx696
Copy link

alx696 commented Feb 26, 2019

@vioulo 注意两个问题:

  1. 你在webui中添加的文件在其它地方(比如ipfs.io)并不是持久的!此文件只在此webui运行(就是IPFS运行)的设备上持久存在。这是一个很常见的误解,多半是被一些不准确的文章误导了。除非一个IPFS节点Pin https://docs.ipfs.io/guides/concepts/pinning/ 了Qm码,否则你访问此IPFS节点网关时,它只缓存此Qm码对应文件(只是临时存在,在垃圾回收后就被删除了)。
  2. 每个IPFS节点(就是运行IPFS的设备)都是可以作为网关的,网关就是提供 http://IP或域名/ipfs/Qm... 地址访问的服务。只不过默认情况下只能在运行IPFS的设备上通过 http://127.0.0.1:8080/ipfs/Qm... 地址访问,局域网内其它电脑都是不能访问的。你可以通过下面的设置放开限制和修改端口:
$ ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/6001

执行修改后记得重启IPFS,这样你就可以在局域网内通过 http://IPFS运行设备IP:6001/ipfs/Qm... 来访问文件了. 如果你有公网IP, 做了映射和域名DNS绑定之后, 就可以用自己的域名访问.

IPFS涉及的知识比较多,我现在还没有摸透。

@fsdiogo
Copy link
Contributor

fsdiogo commented Feb 26, 2019

Please post in english as others may have the same issues and we all want to help and learn.

@fsdiogo fsdiogo closed this as completed Feb 26, 2019
@cisan86
Copy link

cisan86 commented Oct 24, 2022

i also meet this question. i use ipfs add [file] to add this file but i cannot access to it in another computer
image

@cisan86
Copy link

cisan86 commented Oct 24, 2022

i also meet this question. i use ipfs add [file] to add this file but i cannot access to it in another computer image

https://ipfs.io/ipfs/QmQkMPmbPsYnw5HHC6MZAx3SJLirCCP5ThiVzqdibW4PhH?filename=ipfstest2.png

when i use ipfs stats bitswap it shows as follows:
image

@jia9iZhang
Copy link

  1. 我在 webui 文件里面添加了一个文件,现在它不能在 ipfs.io 里面访问到了,是我哪里做的不对吗?文件地址是 https://ipfs.io/ipfs/QmUVX5y1s11MRQFrYP1SJaMm1gGWUBmNjsA1JkHd3VkHvM
  2. 添加的文件是不是都需要经过 ipfs.io 来访问,可是不挂梯子,我连 ipfs.io 都访问不了;我提交的文件,别人可以不通过 ipfs.io 来获取吗?

I'm having the same issue, how do I fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants