ipfs-minifile
v1.0.4
Published
A smart ipfs library to upload text and files over IPFS public nodes, easily
Downloads
9
Readme
IPFS MiniFile
A smart ipfs library to upload text and files over IPFS public nodes, easily
Install
npm i ipfs-minifile
const {uplaodText,uploadFile} = require('ipfs-minifile')
This library works on the top of IPFS-http-client and uses infura node
How to use
let test = async ()=>{
var {url} = await uplaodText('Hello world')
console.log(url) // https://ipfs.io/ipfs/QmNRCQWfgze6AbBCaT1rkrkV5tJ2aP4oTNPb5JZcXYywve
var {url} = await uploadFile('./file.txt')
console.log(url) // https://ipfs.io/ipfs/QmNsaj7DyteoeiSJ3VQmadZAQQmgTFTFTVVTG3mBt2qJdG
}
test()