aboutsummaryrefslogtreecommitdiff
path: root/src/components/FileUpload
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/FileUpload')
-rw-r--r--src/components/FileUpload/FileUpload.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/FileUpload/FileUpload.tsx b/src/components/FileUpload/FileUpload.tsx
index 6a31656..d455f62 100644
--- a/src/components/FileUpload/FileUpload.tsx
+++ b/src/components/FileUpload/FileUpload.tsx
@@ -1,7 +1,7 @@
import React, { useRef } from 'react';
-import { utils } from 'react-sage';
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;
@@ -15,7 +15,7 @@ const FileUpload: React.FC<PropTypes> = ({ callback, children }) => {
const files = event.target?.files;
if (files?.length) {
const file = files[0];
- utils.loadFile(file).then(url => callback(url, file));
+ getLocalFileUrl(file).then(url => callback(url, file));
};
};