Notice
Recent Posts
Recent Comments
Link
목록MFS (1)
반업주부의 일상 배움사
[IPFS] Node.js를 이용한 파일 업로드 방식들 파헤치기
기본 세팅 및 파일 버퍼 준비. const fs = require('fs'); const Client = require('ipfs-http-client'); const ipfs = Client.create({ host: 'localhost', port: '80', protocol: 'http', }); const testFile = fs.readFileSync('hello_world.txt', 'utf8'); const testBuffer = Buffer.from(testFile); async function go() { // 여기에 입력합니다. } go() 1. 파일 버퍼 그대로 업로드. async function go() { const result = await ipfs.add(testBuffer);..
IT 인터넷/Blockchain
2022. 9. 1. 16:48