IPFS.

Пост

Поделитесь своими знаниями.

IPFS moderator.
Mar 22, 2024
Экспертные Вопросы и Ответы

How to Use toGatewayURL to Save NFT Image URL for Image Component?

I am trying to utilize toGatewayURL to save the URL from an NFT image for use in an Image Component. However, I am unsure of what to specify as the gateway parameter in the function call. I have attempted to use hanlo.mypinata.cloud as the gateway, but it does not work. Additionally, I have a token available for use with the gateway. How can I correctly configure toGatewayURL with the appropriate gateway and token to save the NFT image URL?

  • IPFS
  • JavaScript
  • NFT.Storage
0
1
Поделиться
Комментарии
.

Ответы

1
IPFS moderator.
Mar 22 2024, 12:55

The library that provides the toGatewayURL function is NFT.storage. However, Pinata also offers extensive gateway information on their documentation page at https://docs.pinata.cloud/docs/gateways-page.

It appears that the toGatewayURL function requires a gateway URL and an IPFS CID to generate a functional URL. While using a generic gateway like "https://dweb.link/" should suffice, leveraging Pinata's dedicated gateways may offer better performance if you are already utilizing their services.

0
Официальный ответ
Комментарии
.

Знаете ответ?

Пожалуйста, войдите в систему и поделитесь им.

The InterPlanetary File System (IPFS) is a protocol, hypermedia and file sharing peer-to-peer network for storing and sharing data in a distributed file system.

95Посты95Ответы
Sui.X.Peera.

Заработай свою долю из 1000 Sui

Зарабатывай очки репутации и получай награды за помощь в развитии сообщества Sui.