diff --git a/packages/api/src/routes/nfts-upload.js b/packages/api/src/routes/nfts-upload.js index 86632f0d7c..26dcda63da 100644 --- a/packages/api/src/routes/nfts-upload.js +++ b/packages/api/src/routes/nfts-upload.js @@ -178,7 +178,16 @@ export async function uploadCarWithStat( // should only be 1 - shard size in w3up is > max upload size in CF /** @type {import('@web3-storage/w3up-client/types').CARLink[]} */ const shards = [] - await w3up.uploadCAR(new Blob([stat.carBytes]), { + const carBytesBlobLike = { + stream: () => + new ReadableStream({ + start(c) { + c.enqueue(stat.carBytes) + c.close() + }, + }), + } + await w3up.uploadCAR(carBytesBlobLike, { onShardStored: ({ cid }) => { shards.push(cid) },