Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/quiet-walls-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@thirdweb-dev/storage": patch
---

Pass through options
2 changes: 1 addition & 1 deletion packages/storage/src/core/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export class ThirdwebStorage<T extends UploadOptions = IpfsUploadBatchOptions> {

if (files.length) {
// Upload all files that came from the object
const uris = await this.uploader.uploadBatch(files);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oof.. make sure that all other calls pass the options properly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is tricky - the way we used to do it is only pass through options (and onProgress) through to one of the calls on batchUpload because otherwise the progress would reset in the middle (since we upload files first, then the top-level object). So we may want to only pass through onProgress to the file upload.

Can keep this as a fix for now though

const uris = await this.uploader.uploadBatch(files, options);

// Recurse through data and replace files with hashes
cleaned = replaceObjectFilesWithUris(cleaned, uris) as unknown[];
Expand Down