actionUploadFiles.js 314 B

12345678
  1. import { actionUploadFile } from './actionUploadFile';
  2. import { actionPromise } from '../reducers';
  3. export const actionUploadFiles =
  4. (files = []) =>
  5. async (dispatch, getState) => {
  6. dispatch(actionPromise('uploadFiles', Promise.all(files?.map((file) => dispatch(actionUploadFile(file))))));
  7. };