1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

tried to make upload sagas

This commit is contained in:
muerwre 2019-08-07 15:09:28 +07:00
parent caf85c104f
commit 3872ff5903
9 changed files with 180 additions and 80 deletions

View file

@ -1,10 +1,15 @@
import { IFile } from "~/redux/types";
import { IUploadState, IUploadStatus } from "./reducer";
const prefix = 'UPLOAD.';
export const UPLOAD_ACTIONS = {
UPLOAD_FILES: `${prefix}UPLOAD_FILES`,
UPLOAD_CANCEL: `${prefix}UPLOAD_CANCEL`,
ADD_STATUS: `${prefix}ADD_STATUS`,
DROP_STATUS: `${prefix}DROP_STATUS`,
SET_STATUS: `${prefix}SET_STATUS`,
};
export const EMPTY_FILE: IFile = {
@ -19,3 +24,14 @@ export const EMPTY_FILE: IFile = {
type: 'image',
mime: 'image/jpeg',
};
export const EMPTY_UPLOAD_STATUS: IUploadStatus = {
is_uploading: false,
preview: null,
error: null,
uuid: null,
url: null,
progress: 0,
thumbnail_url: null,
type: null,
}