Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/ParseFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
* @flow
*/
/* global XMLHttpRequest, File */
/* global XMLHttpRequest, Blob */
import CoreManager from './CoreManager';
import type { FullOptions } from './RESTController';

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

type Base64 = { base64: string };
type Uri = { uri: string };
type FileData = Array<number> | Base64 | File | Uri;
type FileData = Array<number> | Base64 | Blob | Uri;
export type FileSource = {
format: 'file';
file: File;
file: Blob;
type: string
} | {
format: 'base64';
Expand Down Expand Up @@ -109,7 +109,7 @@ class ParseFile {
base64: this._data,
type: specifiedType
};
} else if (typeof File !== 'undefined' && data instanceof File) {
} else if (typeof Blob !== 'undefined' && data instanceof Blob) {
this._source = {
format: 'file',
file: data,
Expand Down