Skip to content

Commit 08df7c9

Browse files
authored
Allow any Blob to be uploaded
`File` is a subclass of `Blob` and thus this will still accept any `File` as before. The benefit of also allowing `Blob` is that those are user-creatable, and you can get them from a `Canvas` if you are e.g. resizing images in the browser before uploading them.
1 parent 9365179 commit 08df7c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ParseFile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class ParseFile {
109109
base64: this._data,
110110
type: specifiedType
111111
};
112-
} else if (typeof File !== 'undefined' && data instanceof File) {
112+
} else if (typeof Blob !== 'undefined' && data instanceof Blob) {
113113
this._source = {
114114
format: 'file',
115115
file: data,

0 commit comments

Comments
 (0)