1.0.14-alpha.0 • Published 2 years ago

@konomi-network/decentralized-fs v1.0.14-alpha.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

decentralized-fs

Decentralized File Storage Library

Usage

Before using package at local, make sure you've install ipfs and run ipfs daemon

    ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST", "OPTIONS"]'
    ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
    ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'
    ipfs config --json API.HTTPHeaders.Access-Control-Allow-Headers '["Authorization"]'
    ipfs config --json API.HTTPHeaders.Access-Control-Expose-Headers '["Location"]'
    ipfs daemon

Then try with below example:

import DecentralizedFileStorage from '@konomi-network/decentralized-fs';

async function test() {
	const dfs = new DecentralizedFileStorage('http://localhost:5001');
	const cid = await dfs.save('hello, dfs!');
	console.log('cid: ', cid, ' content: ', await dfs.find(cid));
}

test();
1.0.13-alpha.0

2 years ago

1.0.14-alpha.0

2 years ago

1.0.9-alpha.0

2 years ago

1.0.9

2 years ago

1.0.10-alpha.0

2 years ago

1.0.11-alpha.0

2 years ago

1.0.12-alpha.0

2 years ago

1.0.4-alpha.0

2 years ago

1.0.7

2 years ago

1.0.8-alpha.0

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.4

3 years ago

0.0.3

3 years ago