Commit ffa164e
committed
Fix fetch body handling for FileUpload objects in uploadToStorage
Restore the original conditional logic to properly handle both File and FileUpload types.
- File objects extend Blob and can be passed directly to fetch
- FileUpload objects need .stream() called to get a ReadableStream for the fetch body
- Added type assertion to help TypeScript with type narrowing
This fixes the misleading type signature where File | FileUpload is accepted
but only File was being handled correctly.1 parent 54e0fd0 commit ffa164e
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments