You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 5, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: sdk/src/utils/fetchers.ts
+21-11Lines changed: 21 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -3,10 +3,10 @@ import { logger } from "./logger";
3
3
importaxiosfrom"axios";
4
4
5
5
/**
6
-
* Fetches data from IPFS using either the NFT Storage gateway or the Web3Up gateway.
6
+
* Fetches data from IPFS using either the DWeb IPFS, NFT Storage, or the Web3Up gateway.
7
7
*
8
-
* This function attempts to fetch data from the NFT Storage gateway first. If the request times out, it then tries to fetch the data from the Web3Up gateway.
9
-
* If the data cannot be fetched from either gateway, it throws a `StorageError`.
8
+
* This function attempts to fetch data from all gateways at the same time and returns on the first on to resolve.
9
+
* If the data cannot be fetched from any gateway, it throws a `StorageError`.
10
10
*
11
11
* @param {string} cidOrIpfsUri - The CID or IPFS URI of the data to fetch.
12
12
* @param {number} [timeout=10000] - The timeout for the fetch request in milliseconds. Defaults to 10000ms.
0 commit comments