Skip to content

Commit

Permalink
Merge pull request #18 from supabase/5_server_side_storage_upload_types
Browse files Browse the repository at this point in the history
feat: #5 document `Buffer` and `NodeJS.ReadableStream` support
  • Loading branch information
inian committed Jul 19, 2021
2 parents 9f36c20 + 6232212 commit 679a154
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib/StorageFileApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ export class StorageFileApi {
| ArrayBuffer
| ArrayBufferView
| Blob
| Buffer
| File
| FormData
| NodeJS.ReadableStream
| ReadableStream<Uint8Array>
| URLSearchParams
| string,
Expand Down Expand Up @@ -78,7 +80,7 @@ export class StorageFileApi {
const _path = this._getFinalPath(path)
const res = await fetch(`${this.url}/object/${_path}`, {
method,
body,
body: body as BodyInit,
headers,
})

Expand Down Expand Up @@ -111,8 +113,10 @@ export class StorageFileApi {
| ArrayBuffer
| ArrayBufferView
| Blob
| Buffer
| File
| FormData
| NodeJS.ReadableStream
| ReadableStream<Uint8Array>
| URLSearchParams
| string,
Expand All @@ -137,8 +141,10 @@ export class StorageFileApi {
| ArrayBuffer
| ArrayBufferView
| Blob
| Buffer
| File
| FormData
| NodeJS.ReadableStream
| ReadableStream<Uint8Array>
| URLSearchParams
| string,
Expand Down

0 comments on commit 679a154

Please sign in to comment.