diff options
Diffstat (limited to 'src/components/FileUpload/FileUpload.tsx')
-rw-r--r-- | src/components/FileUpload/FileUpload.tsx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/components/FileUpload/FileUpload.tsx b/src/components/FileUpload/FileUpload.tsx index d455f62..961fa9a 100644 --- a/src/components/FileUpload/FileUpload.tsx +++ b/src/components/FileUpload/FileUpload.tsx @@ -1,10 +1,9 @@ import React, { useRef } from 'react'; import Button from '@material-ui/core/Button'; import CloudUpload from '@material-ui/icons/CloudUpload'; -import { getLocalFileUrl } from '../../utils/files'; interface PropTypes { - callback: (fileUrl: string, file: File) => void; + callback: (file: File) => void; } @@ -13,10 +12,7 @@ const FileUpload: React.FC<PropTypes> = ({ callback, children }) => { const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => { const files = event.target?.files; - if (files?.length) { - const file = files[0]; - getLocalFileUrl(file).then(url => callback(url, file)); - }; + if (files?.length) callback(files[0]); }; const handleClick = () => { |