Where does IPFS store all the data?

I've been trying to implement and understand the working of IPFS and have a few things that aren't clear.Things i've tried:Implemented IPFS on my system and stored files on it. Even if I delete the files from my system and close the ipfs daemon, I am still able to access the files from a different machine through IPFS.I've noticed there's a .ipfs folder in my home directory that contains the part of blocks of data that i add to IPFS.Questions:1. Are the blocks stored locally on my system too?2. Where else is the data stored? On other peers that...Read more

How to run several IPFS nodes on a single machine?

For testing, I want to be able to run several IPFS nodes on a single machine. This is the scenario:I am building small services on top of IPFS core library, following the Making your own IPFS service guide. When I try to put client and server on the same machine (note that each of them will create their own IPFS node), I will get the following:panic: cannot acquire lock: Lock FcntlFlock of /Users/long/.ipfs/repo.lock failed: resource temporarily unavailable...Read more

How to send a file from the browser to a remote IPFS gateway

I have an input field that's calling a _getFile function<input type="file" class="file" on-change="_getFile"/>the get file _getFile(event) { this.loading = true; const file = event.target.files[0]; let reader = new window.FileReader() reader.onloadend = () => this._saveToIpfs(reader) reader.readAsArrayBuffer(file) }}once we have an array buffer we then call..._saveToIpfs(data){}It is this that I need help with, I want to send the selected file to 'https://ipfs.infura.io:5001/api/v0/add' or 'https://ipfs.io/api/v0/add ' how to do? ...Read more

How IPFS search files?

In order to find the file in IPFS network by it's hash we should ask the adjacent nodes - "Do you have the file with hash H(F)?" and if not, then they propagate the question further. How IPFS resolve the issue in case of plurality of this kind of requests? How IPFS search engine works?...Read more

How to create an ipfs repo

How does one create an ipfs repo in JavaScript without node.js?I have some trouble figuring out how to create an in-memory store to pass to the IpfsRepo class.var repo = new IpfsRepo('example', ?)...Read more

IPFS add returns 2 jsons

The add command returns 2 jsons - not yet sure if this is a bug or a feature that I am not aware of:⋊> ~ curl -F "image=@/home/ligi/bar" 127.0.0.1:5001/api/v0/add 00:53:12{"Name":"bar"}{"Name":"bar","Hash":"QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH"}Unfortunately this then breaks the ipfs-java-api...Read more

How to create an IPFS compatible multihash

I'm trying to create an IPFS compatible mutihash but it is not matching. I am asking here because I have not yet found an example that takes this from hashing to the end result.echo -n multihash > multihash.txtipfs add multihash.txtadded QmZLXzjiZU39eN8QirMZ2CGXjMLiuEkQriRu7a7FeSB4fg multihash.txtsha256sum multihash.txt9cbc07c3f991725836a3aa2a581ca2029198aa420b9d99bc0e131d9f3e2cbe47 multihash.txtnode> var bs58=require('bs58')bs58.encode(new Buffer('9cbc07c3f991725836a3aa2a581ca2029198aa420b9d99bc0e131d9f3e2cbe47','hex'))'BYptxaTgpcBrqZx...Read more

I am not getting any Ipfs peers. Ipfs daemon is running but ipfs swarm peers show nothing?

in first terminal/Desktop/JOO$ ipfs daemonInitializing daemon...Adjusting current ulimit to 2048...Successfully raised file descriptor limit to 2048.Swarm listening on /ip4/10.14.13.31/tcp/4001Swarm listening on /ip4/127.0.0.1/tcp/4001Swarm listening on /ip6/::1/tcp/4001API server listening on /ip4/127.0.0.1/tcp/5001Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8088Daemon is readyIn second terminal/Desktop/JOO$ ipfs swarm peers...Read more

ipfs - CIDs with dag-cbor formats as V0 addresses

I'm trying to retrieve a DAG persisted with the following options via webui. As I understand it, to do so I have to convert to a V0 address as per — https://github.com/ipld/js-cid/blob/38e5dd0f5e89a750d9f20efefdaa00d38b287739/test/index.spec.js#L81 :const dagOpts = { format: 'dag-cbor', hashAlg: 'sha3-512' };I have the following code that results in an error — 'Cannot convert a non dag-pb CID to CIDv0' : let cid = new CID("zdpuAypJXbmGCLweJBL6R1iBpDGJyP8LU1BwZjzRjwNxohzvE"); console.log(cid.toV0());Is it possible at all to access obj...Read more

How can you list all file objects loaded in IPFS?

I can add recursively a bunch of files within IPFS with $ ipfs add -r data/How can I get a list back of all loaded file objects [in a specific directory]? Similar to aws s3 listObjects...The ipfs file ls command does not seem to be recursive. I understand that I can call the API a thousand times but that does not seem to be very efficient.I must be missing something here.Thanks,Pat....Read more