From 24e0bf6faf1d3b05bbbdb586baa7f9bed50e7221 Mon Sep 17 00:00:00 2001 From: Sonja Happ Date: Thu, 14 May 2020 12:59:34 +0200 Subject: [PATCH] Use Blob instead of File data type to store file in file store #147 --- src/file/file-store.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/file/file-store.js b/src/file/file-store.js index cb0d167..c5c87b9 100644 --- a/src/file/file-store.js +++ b/src/file/file-store.js @@ -28,8 +28,8 @@ class FileStore extends ArrayStore { let fileID = parseInt(action.id) state.forEach((element, index, array) => { if (element.id === fileID) { - // save file object - array[index]["data"] = new File([action.data.data], element.name, {type: action.data.type}); + // save blob object + array[index]["data"] = new Blob([action.data.data], {type: action.data.type}); // update file type array[index]["type"] = action.data.type;