Questions tagged [js-ipfs]

The JavaScript implementation of the IPFS (InterPlanetary File System) protocol.

IPFS logo

The InterPlanetary File System is a hypermedia distribution protocol, addressed by content and identities. It enables the creation of completely distributed applications.

IPFS aims to make the web faster, safer, and more open by connecting all computing devices with the same system of files.

js-ipfs provides a library which enables users to spin up full IPFS nodes from JavaScript. It runs in the command line, or in the browser.

Latest release of js-ipfs is 0.54.4. Read more about the latest release at https://github.com/ipfs/js-ipfs/releases

js-ipfs documentation: https://github.com/ipfs/js-ipfs/tree/master/docs

95 questions
2
votes
1 answer

How to convert IPFS link into JSON?

So my friends are making an NFT contract and using IPFS to store the metadata. I want to look at the JSON contained in that IPFS link generated so that I can display the metadata in a Bootstrap card. When I use this code to call one of the surfaced…
PhilosophOtter
  • 183
  • 1
  • 2
  • 12
2
votes
1 answer

Upload data from a webpage to an IPFS

How can we upload data from a webpage to an IPFS server? In IPFS, I have already uploaded a .txt/JSON empty file. The file can either be a .txt or a JSON file.
yamna iftikhar
  • 103
  • 1
  • 5
2
votes
1 answer

IPNS name published in browser with js-ipfs won't resolve on gateway or local node

I am working on a browser application which uses js-ipfs. After I publish an ipfs address (e.g. /ipfs/Qm...), I successfully get the returned name (i.e. /ipns/Qm..). But the problem is that I can't resolve it anywhere else (local node's gateway,…
ajaleksa
  • 324
  • 1
  • 6
  • 20
2
votes
1 answer

How to log peer messages in IPFS / libp2p in the browser?

I did a test to see what would happen if I try getting a CID that doesn't exist, to see if I could continuously ask every peer in IPFS. It doesn't seem to work. I "connect" to around 10 peers, then it gives up. I'm not sure I'm actually "connecting"…
cooldude101
  • 1,215
  • 2
  • 14
  • 29
2
votes
1 answer

IPFS js cant connect to ws://127.0.0.1:8081/p2p/

I am running a ipfs js instance which is working well but i get some error with web sockets and I am unsure why it is even calling a local IP ? Firefox can’t establish a connection to the server at…
adamprocter
  • 856
  • 1
  • 15
  • 31
2
votes
0 answers

Subscribe to IPNS changes in IPFS JS

When an IPNS name updates the multihash it points to, I want to load the new file in a browser. Is there a way I can detect the multihash has changed with js-ipfs without polling?
Phil Holden
  • 194
  • 8
2
votes
1 answer

ipfs.add is not working for ipfs client v44.3.0 how can I resolve this?

This is my code in App.js, and its always returning an "Unhandeled Rejection Type error saying that ipfs.add(...). then is not a function. import React, { Component } from 'react'; import './App.css'; var ipfsAPI = require('ipfs-http-client') var…
1
vote
0 answers

js-ipfs connect two browser peers

I have 2 devices (desktop PCs), each running a browser tab that instantiates an IPFS node using js-ipfs. //file index.html, served over HTTPS const node = IpfsCore.create(); //ipfs browser node Both nodes have peers (calling node.swarm.addrs()…
Michael G
  • 458
  • 2
  • 9
1
vote
1 answer

How to connect to IPFS node started programmatically using ipfs-core from a java server?

I am programmatically starting an IPFS node using JS ipfs-core(npm package) with a custom repository using a different storage backend(similar to S3). Now once the node is started in the AWS instance, I want to send requests to the node using a…
Rebekkal
  • 26
  • 3
1
vote
1 answer

Does js-ipfs have a readonly gateway server?

When I start my local ipfs node with ipfs daemon, in the cmd I get this: Gateway (readonly) sever listening on /ip4/127.0.0.1/tcp/8080 With this, I can say 127.0.0.1:8080/ipfs/CID and read files from IPFS. In my Node.js app, when I run…
1
vote
1 answer

Where exactly in IPFS.create() or IPFS.add() does my node propagate an updated distributed hash table upon adding a file?

Original question: Does the IPFS.add() method automatically update my local DHT and propagate it to other peers? In order to test whether the IPFS.add() method alone allows other peers to download content from a my pc, I ran this script on my…
rasputin
  • 31
  • 5
1
vote
1 answer

'504 Gateway timeout error' on IPFS after I generate CID

I am currently just trying to upload a file to IPFS which I think I have been able to do as it successfully returns a CID for the file. However, when I then go to https://ipfs.io/ipfs/ I then always get a 504 Gateway timeout error every time…
1
vote
0 answers

Does the IPFS JavaScript client support stream (chunked) uploads?

Is there a way to upload a file to IPFS chunk-by-chunk using the js-ipfs-http-client package? To improve the concurrency model of my application, I’d like to avoid holding complete files in memory and instead just work with the chunks. In the…
lmonninger
  • 831
  • 3
  • 13
1
vote
0 answers

Use ipfs-core to set up node in browser with reactjs

I'm trying to set up a local ipfs node for frontend users. I came across the "ipfs-core" module: https://www.npmjs.com/package/ipfs-core?activeTab=readme When trying to instantiate the ipfs node I get the error "ipfs-core" can't be resolved. I then…
Luex
  • 33
  • 4
1
vote
0 answers

go ipfs node access files from js ipfs browser node?

I have two ipfs nodes. One js-ipfs node running in the browser and one go-ipfs node. Each node is running on separate hardware. The nodes are not directly connected. I'm having trouble access files added on the js-ipfs node from the go-ipfs node. Is…
Bob
  • 513
  • 1
  • 6
  • 9