diff options
Diffstat (limited to 'src/hooks')
-rw-r--r-- | src/hooks/useS3Preupload.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/hooks/useS3Preupload.tsx b/src/hooks/useS3Preupload.tsx index 22f2513..651bfb6 100644 --- a/src/hooks/useS3Preupload.tsx +++ b/src/hooks/useS3Preupload.tsx @@ -20,11 +20,10 @@ interface Hook { const compressFile = (file: File, quality = 0.6): Promise<Blob> => { return new Promise((resolve, reject) => { - // eslint-disable-next-line no-new - new Compressor(file, { + return new Compressor(file, { success: result => resolve(result), error: err => reject(err), - quality, + quality }); }); }; |