mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
uploading mpegs
This commit is contained in:
parent
60dbb496c4
commit
4a3de2ab01
3 changed files with 13 additions and 19 deletions
|
@ -71,11 +71,9 @@ export const fakeUploader = ({
|
|||
});
|
||||
};
|
||||
|
||||
export const getFileType = (file: File) => {
|
||||
console.log({ type: file.type });
|
||||
|
||||
export const getFileType = (file: File): keyof typeof UPLOAD_TYPES => {
|
||||
return (
|
||||
(file.type && Object.keys(FILE_MIMES).find(mime => FILE_MIMES[mime].includes(file.type))) ||
|
||||
UPLOAD_TYPES.OTHER
|
||||
null
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue