aboutsummaryrefslogtreecommitdiff
path: root/src/hooks/useS3Preupload.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-08-14 02:24:18 +0300
committereug-vs <eug-vs@keemail.me>2020-08-14 02:24:18 +0300
commit88d3c411efbf5f6ac74fa67e38c154f1e53d4938 (patch)
tree590bcc2d8cd25b054cdaeff877fb595528840347 /src/hooks/useS3Preupload.tsx
parent60583c1496aeaf366087bff550da8e9288ff33cf (diff)
downloadwhich-ui-88d3c411efbf5f6ac74fa67e38c154f1e53d4938.tar.gz
feat: show upload progress
Diffstat (limited to 'src/hooks/useS3Preupload.tsx')
-rw-r--r--src/hooks/useS3Preupload.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/hooks/useS3Preupload.tsx b/src/hooks/useS3Preupload.tsx
index aeb1d65..64db942 100644
--- a/src/hooks/useS3Preupload.tsx
+++ b/src/hooks/useS3Preupload.tsx
@@ -41,7 +41,10 @@ export default () => {
const { config: { url } } = response;
return url ? url.slice(0, url.indexOf('?')) : '';
});
- } else return url || '';
+ } else {
+ setProgress(100);
+ return url || '';
+ }
}, [file, handleUploadProgress, url]);
return { setValue, isReady, resolve, progress };