7d22328543
* Add whitelist contract address to the collection creation result box * Account for the no whitelist option
9 lines
348 B
TypeScript
9 lines
348 B
TypeScript
import type { CIDString } from 'nft.storage'
|
|
import { NFTStorage } from 'nft.storage'
|
|
|
|
export const uploadToNftStorage = async (fileArray: File[], nftStorageApiKey: string): Promise<CIDString> => {
|
|
console.log('Uploading to NFT.Storage...')
|
|
const client = new NFTStorage({ token: nftStorageApiKey })
|
|
return client.storeDirectory(fileArray)
|
|
}
|