Uncaught TypeError: data is not an Blob or File(…)UploadFS.Uploader @ ufs-uploader.js:47(anonymous function) @ methods.js:23reader.onload @ helpers.js:44
methods.js
export function upload(dataUrl, name, resolve, reject) {
// convert to Blob
const blob = dataURLToBlob(dataUrl);
blob.name = name;
// pick from an object only: name, type and size
const file = _.pick(blob, ‘name’, ‘type’, ‘size’);
// convert to ArrayBuffer
blobToArrayBuffer(blob, (data) => {
const upload = new UploadFS.Uploader({
data,
file,
store: ImagesStore,
onError: reject,
onComplete: resolve
});
upload.start();
}, reject);
}