1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

Use Blob instead of File data type to store file in file store #147

This commit is contained in:
Sonja Happ 2020-05-14 12:59:34 +02:00
parent e4e9fce2df
commit 24e0bf6faf

View file

@ -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;