File is not showing in NFT storage on IPFS

Viewed 865

I uploaded file to NFT Storage I can see file list in https://nft.storage/files/ but if I clicked CID links, I get error ipfs cat /ipfs/bafyreiayui2us6fpowl42vqwmjrntpewhqpfkbgcak6pt4gkpz55z2o3se/: unknown node type

My code is as below

    const { NFTStorage, File } = require('nft.storage')
    const apiKey ='eyJ........CJ9'
    const client = new NFTStorage({ token: apiKey })

    const metadata = await client.store({
       name: artworkName,
       description: description,
       artistName: artistName,
       image: new File(data, fileName, { type: artfile.mimetype }),
    })
    console.log(metadata.url)

I can see metadata.json and file on NFT Storage nft storage

I think, there is an issue for file size.

Please help me

2 Answers

Try: ipfs cat /metadata.json

and from the JSON you will find a link to your image.

Related