Skip to content

Commit

Permalink
[SDK] Fix: Upload storage timeout (#6300)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregfromstl authored Feb 24, 2025
1 parent f693ab8 commit 2cb89cb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/twelve-walls-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Fix storage upload timeout
2 changes: 1 addition & 1 deletion packages/thirdweb/src/storage/upload/mobile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export async function uploadBatchMobile(
"Request to upload timed out! No upload progress received in 30s",
),
);
}, 30000);
}, client.config?.storage?.fetch?.requestTimeoutMs ?? 30000);

xhr.upload.addEventListener("progress", (event) => {
clearTimeout(timer);
Expand Down
1 change: 1 addition & 0 deletions packages/thirdweb/src/storage/upload/web-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export async function uploadBatch<const TFiles extends UploadableFile[]>(
method: "POST",
headers,
body: form,
requestTimeoutMs: client.config?.storage?.fetch?.requestTimeoutMs,
},
);

Expand Down

0 comments on commit 2cb89cb

Please sign in to comment.