Skip to content

Commit

Permalink
fix: renterd-js objectUpload support more data types
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfreska committed Apr 22, 2024
1 parent a9321f0 commit ae0e29b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/gentle-onions-report.md
@@ -0,0 +1,5 @@
---
'@siafoundation/renterd-types': patch
---

Fixed an issue where objectUpload only supported the browser File data type. Closes https://github.com/SiaFoundation/web/issues/591
10 changes: 8 additions & 2 deletions libs/renterd-types/src/worker.ts
Expand Up @@ -19,7 +19,13 @@ export type ObjectDownloadPayload = void
export type ObjectDownloadResponse = Blob

export type ObjectUploadParams = { key: string; bucket: string }
export type ObjectUploadPayload = File
export type ObjectUploadPayload =
| File
| Blob
| Buffer
| ArrayBuffer
| string
| Record<string, unknown>
export type ObjectUploadResponse = void

export type MultipartUploadPartParams = {
Expand All @@ -32,7 +38,7 @@ export type MultipartUploadPartParams = {
minshards?: number
totalshards?: number
}
export type MultipartUploadPartPayload = Blob
export type MultipartUploadPartPayload = Blob | Buffer | ArrayBuffer | string
export type MultipartUploadPartResponse = void

export type RhpScanParams = void
Expand Down

0 comments on commit ae0e29b

Please sign in to comment.