From 9652cf1fd81d909846259d6d43204c9f890696b5 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 31 Jan 2024 02:29:25 -0800 Subject: [PATCH] fix file uploads (#2) * fix file uploads * fix file uploads --- index.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/index.js b/index.js index 94e99fd..83864fb 100644 --- a/index.js +++ b/index.js @@ -34,12 +34,7 @@ const main = async () => { const name = await Name.from(Buffer.from(w3namePrivateKey, 'hex')) const revision = Name.Revision.decode(Buffer.from(w3nameRevision, 'hex')) - const file = new File( - await filesFromPaths([source]), - 'source.tar.gz', - { type: 'application/gzip' } - ) - const cid = await web3Storage.uploadFile(file) + const cid = await web3Storage.uploadFile((await filesFromPaths([source]))[0]) console.log(`Uploaded as ${cid}`) const nextRevision = await Name.increment(revision, `/ipfs/${cid}`)