ipfs-file-manager/index.js

14 lines
448 B
JavaScript
Raw Normal View History

2023-06-20 22:30:55 +00:00
import IPFSFileUploader from './IPFSFileUploader.js';
import IPFSFileRetriever from './IPFSFileRetriever.js';
// const filePath = './file.dat';
// const ipfsFileUploader = new IPFSFileUploader();
// const cid = ipfsFileUploader.uploadFileToIPFS(filePath);
// console.log(cid)
const cid = "QmP5DGmXZBrnvL2mgEUTwtccbupfKhTbwDjFMtmWAj7CLN";
const ipfsFileRetriever = new IPFSFileRetriever();
ipfsFileRetriever.retrieveFileFromIPFS(cid, './data');