Skip to content

Commit

Permalink
fix file uploads (#2)
Browse files Browse the repository at this point in the history
* fix file uploads

* fix file uploads
  • Loading branch information
juliangruber authored Jan 31, 2024
1 parent 356c77d commit 9652cf1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
Expand Down

0 comments on commit 9652cf1

Please sign in to comment.