X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/ea54fb82c3a59ca8a959643f8bec4776635433e0..fe477581df706f4c2c1669f2df584bd94dbb4bea:/src/store/collections/collection-upload-actions.ts diff --git a/src/store/collections/collection-upload-actions.ts b/src/store/collections/collection-upload-actions.ts index ef241a7c..cf8c37c8 100644 --- a/src/store/collections/collection-upload-actions.ts +++ b/src/store/collections/collection-upload-actions.ts @@ -9,7 +9,7 @@ import { dialogActions } from '~/store/dialog/dialog-actions'; import { loadCollectionFiles } from '../collection-panel/collection-panel-files/collection-panel-files-actions'; import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions'; import { fileUploaderActions } from '~/store/file-uploader/file-uploader-actions'; -import { reset, startSubmit } from 'redux-form'; +import { reset, startSubmit, stopSubmit } from 'redux-form'; import { progressIndicatorActions } from "~/store/progress-indicator/progress-indicator-actions"; export const uploadCollectionFiles = (collectionUuid: string) => @@ -45,6 +45,13 @@ export const submitCollectionFiles = () => })); dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_UPLOAD_FILES_DIALOG)); } catch (e) { + dispatch(stopSubmit(COLLECTION_UPLOAD_FILES_DIALOG)); + dispatch(closeUploadCollectionFilesDialog()); + dispatch(snackbarActions.OPEN_SNACKBAR({ + message: 'Data has not been uploaded. Too large file', + hideDuration: 2000, + kind: SnackbarKind.ERROR + })); dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_UPLOAD_FILES_DIALOG)); } }