mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
remove files from FileStore after result is deleted
This commit is contained in:
parent
4038a998df
commit
06efee1143
1 changed files with 11 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
|||
|
||||
import ArrayStore from '../common/array-store';
|
||||
import ResultsDataManager from './results-data-manager';
|
||||
import AppDispatcher from '../common/app-dispatcher';
|
||||
|
||||
class ResultStore extends ArrayStore {
|
||||
constructor() {
|
||||
|
@ -56,6 +57,16 @@ class ResultStore extends ArrayStore {
|
|||
this.simplifyTimestamps([action.data]);
|
||||
return super.reduce(state, action);
|
||||
|
||||
case 'results/removed':
|
||||
// Remove files from filestore
|
||||
action.data.resultFileIDs.forEach(fileid => {
|
||||
AppDispatcher.dispatch({
|
||||
type: 'files/removed',
|
||||
data: fileid
|
||||
});
|
||||
});
|
||||
return super.reduce(state, action);
|
||||
|
||||
case 'resultfiles/start-upload':
|
||||
ResultsDataManager.uploadFile(action.data, action.resultID, action.token, action.progressCallback, action.finishedCallback, action.scenarioID);
|
||||
return state;
|
||||
|
|
Loading…
Add table
Reference in a new issue