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:
parent
caf85c104f
commit
3872ff5903
9 changed files with 180 additions and 80 deletions
|
@ -1,7 +1,25 @@
|
|||
import {UPLOAD_ACTIONS} from "~/redux/uploads/constants";
|
||||
import { UPLOAD_ACTIONS } from "~/redux/uploads/constants";
|
||||
import { IFileWithUUID, UUID } from "../types";
|
||||
import { IUploadStatus } from "./reducer";
|
||||
|
||||
export const uploadUploadFiles = (files: File[], subject: string) => ({
|
||||
export const uploadUploadFiles = (files: IFileWithUUID[]) => ({
|
||||
files,
|
||||
subject,
|
||||
type: UPLOAD_ACTIONS.UPLOAD_FILES,
|
||||
});
|
||||
|
||||
export const uploadAddStatus = (temp_id: UUID, status?: Partial<IUploadStatus>) => ({
|
||||
temp_id,
|
||||
status,
|
||||
type: UPLOAD_ACTIONS.ADD_STATUS,
|
||||
});
|
||||
|
||||
export const uploadSetStatus = (temp_id: UUID, status?: Partial<IUploadStatus>) => ({
|
||||
temp_id,
|
||||
status,
|
||||
type: UPLOAD_ACTIONS.SET_STATUS,
|
||||
});
|
||||
|
||||
export const uploadDropStatus = (temp_id: UUID) => ({
|
||||
temp_id,
|
||||
type: UPLOAD_ACTIONS.DROP_STATUS,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue