diff --git a/src/file/file-store.js b/src/file/file-store.js index 4336ebc..6843d7a 100644 --- a/src/file/file-store.js +++ b/src/file/file-store.js @@ -40,6 +40,14 @@ class FileStore extends ArrayStore { case 'files/upload-error': console.log(action.error); return state; + case 'files/loaded': + if (Array.isArray(action.data)) { + return super.reduce(state, action) + } else { + // in this case a file is contained in the response (no JSON) + // TODO we have to extract and process the file here (=save it somewhere?) + return super.reduce(state, action) + } default: return super.reduce(state, action);