Skip to content

Commit 2cb89cb

Browse files
authored
[SDK] Fix: Upload storage timeout (#6300)
1 parent f693ab8 commit 2cb89cb

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.changeset/twelve-walls-teach.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Fix storage upload timeout

packages/thirdweb/src/storage/upload/mobile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export async function uploadBatchMobile(
4141
"Request to upload timed out! No upload progress received in 30s",
4242
),
4343
);
44-
}, 30000);
44+
}, client.config?.storage?.fetch?.requestTimeoutMs ?? 30000);
4545

4646
xhr.upload.addEventListener("progress", (event) => {
4747
clearTimeout(timer);

packages/thirdweb/src/storage/upload/web-node.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export async function uploadBatch<const TFiles extends UploadableFile[]>(
1717
method: "POST",
1818
headers,
1919
body: form,
20+
requestTimeoutMs: client.config?.storage?.fetch?.requestTimeoutMs,
2021
},
2122
);
2223

0 commit comments

Comments
 (0)