mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
removed redux completely
This commit is contained in:
parent
26e6d8d41b
commit
a4bb07e9cf
323 changed files with 2464 additions and 3348 deletions
|
@ -1,9 +1,9 @@
|
|||
import { VALIDATORS } from "~/utils/validators";
|
||||
import { FILE_MIMES, UploadType } from "~/constants/uploads";
|
||||
import { isMimeOfImage } from '~/utils/validators';
|
||||
import { FILE_MIMES, UploadType } from '~/constants/uploads';
|
||||
|
||||
/** if file is image, returns data-uri of thumbnail */
|
||||
export const uploadGetThumb = async file => {
|
||||
if (!file.type || !VALIDATORS.IS_IMAGE_MIME(file.type)) return '';
|
||||
if (!file.type || !isMimeOfImage(file.type)) return '';
|
||||
|
||||
return new Promise<string>(resolve => {
|
||||
const reader = new FileReader();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue