aboutsummaryrefslogtreecommitdiff
path: root/src/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'src/hooks')
-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 };