Skip to content

Commit 13d5c68

Browse files
authored
Merge pull request #837 from LinusU/patch-1
Allow any Blob to be uploaded
2 parents 9365179 + 4af4b2f commit 13d5c68

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ParseFile.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* @flow
1010
*/
11-
/* global XMLHttpRequest, File */
11+
/* global XMLHttpRequest, Blob */
1212
import CoreManager from './CoreManager';
1313
import type { FullOptions } from './RESTController';
1414

@@ -19,10 +19,10 @@ if (typeof XMLHttpRequest !== 'undefined') {
1919

2020
type Base64 = { base64: string };
2121
type Uri = { uri: string };
22-
type FileData = Array<number> | Base64 | File | Uri;
22+
type FileData = Array<number> | Base64 | Blob | Uri;
2323
export type FileSource = {
2424
format: 'file';
25-
file: File;
25+
file: Blob;
2626
type: string
2727
} | {
2828
format: 'base64';
@@ -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)