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

file uploading template

This commit is contained in:
muerwre 2019-08-06 21:23:31 +07:00
parent cfe4731ded
commit 8dc43c77b7
7 changed files with 57 additions and 10 deletions

View file

@ -0,0 +1,7 @@
import {UPLOAD_ACTIONS} from "~/redux/uploads/constants";
export const uploadUploadFiles = (files: File[], subject: string) => ({
files,
subject,
type: UPLOAD_ACTIONS.UPLOAD_FILES,
});

View file

@ -1,5 +1,11 @@
import { IFile } from "~/redux/types";
const prefix = 'UPLOAD.';
export const UPLOAD_ACTIONS = {
UPLOAD_FILES: `${prefix}UPLOAD_FILES`,
};
export const EMPTY_FILE: IFile = {
id: null,
user_id: null,
@ -11,4 +17,4 @@ export const EMPTY_FILE: IFile = {
size: 2400000,
type: 'image',
mime: 'image/jpeg',
};
};

View file

@ -1,3 +1,6 @@
export default function* () {
import {takeEvery} from "redux-saga/effects";
import {UPLOAD_ACTIONS} from "~/redux/uploads/constants";
}
export default function* () {
yield takeEvery(UPLOAD_ACTIONS.UPLOAD_FILES, console.log);
}