desiredGatewayPrefix - The desired gateway you want to convert your source URL to. A few examples of this would be:
https://mygateway.mypinata.cloud
https://ipfs.io
Response
Returns a string that uses the desired source gateway prefix.
Example code:
constsourceUrl="https://exampleGateway.com/ipfs/bafybeifx7yeb55armcsxwwitkymga5xf53dxiarykms3ygqic223w5sk3m";constdesiredGatewayPrefix="https://mygateway.mypinata.cloud";constconvertedGatewayUrl=ipfsGatewayTools.convertToDesiredGateway(sourceUrl,desiredGatewayPrefix);//In the example above, the resulting value for convertedGatewayUrl would be: https://mygateway.mypinata.cloud/ipfs/bafybeifx7yeb55armcsxwwitkymga5xf53dxiarykms3ygqic223w5sk3m
请发表评论