Skip to content

Commit deabbad

Browse files
committed
Expand FileUploadHandler interface to support Blob
1 parent 139fa1c commit deabbad

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/form-data-parser/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This is the changelog for [`form-data-parser`](https://github.com/mjackson/remix-the-web/tree/main/packages/form-data-parser). It follows [semantic versioning](https://semver.org/).
44

5+
## HEAD
6+
7+
- Expand `FileUploadHandler` interface to support returning `Blob` from the upload handler, which is the superclass of `File`
8+
59
## v0.6.0 (2025-01-15)
610

711
- Allow upload handlers to run in parallel. Fixes #44

packages/form-data-parser/src/lib/form-data.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class FileUpload implements File {
6767
* A function used for handling file uploads.
6868
*/
6969
export interface FileUploadHandler {
70-
(file: FileUpload): void | null | string | File | Promise<void | null | string | File>;
70+
(file: FileUpload): void | null | string | Blob | Promise<void | null | string | Blob>;
7171
}
7272

7373
async function defaultFileUploadHandler(file: FileUpload): Promise<File> {

0 commit comments

Comments
 (0)