Uploading file with corruption.

This commit is contained in:
Patrick Fic
2025-10-10 11:34:11 -07:00
parent 620b5135d1
commit 9e02d5a9b7
7 changed files with 412 additions and 20 deletions

View File

@@ -4,6 +4,8 @@ const INITIAL_STATE = {
photos: [],
uploadInProgress: false,
uploadError: null,
jobid: null,
progress: {}
};
const photosReducer = (state = INITIAL_STATE, action) => {
@@ -11,9 +13,22 @@ const photosReducer = (state = INITIAL_STATE, action) => {
case PhotosActionTypes.MEDIA_UPLOAD_START:
return {
...state,
photos: action.payload,
photos: action.payload.photos,
jobid: action.payload.jobid,
uploadInProgress: true,
uploadError: null,
progress: {}
};
case PhotosActionTypes.MEDIA_UPLOAD_FAILURE:
return {
...state,
uploadInProgress: false,
uploadError: action.payload,
};
case PhotosActionTypes.MEDIA_UPLOAD_PROGRESS_UPDATE_ONE:
return {
...state,
progress: { ...state.progress, [action.payload.assetId]: { ...state.progress[action.payload.assetId], ...action.payload } }
};
default: