(event)
| 162 | }); |
| 163 | // file upload function |
| 164 | const fileUpload = async (event) => { |
| 165 | if (event.target.files && event.target.files[0]) { |
| 166 | const file = event.target.files[0]; |
| 167 | const compressedfile = await compressImage( |
| 168 | file, |
| 169 | { width: 200, height: 200 }, |
| 170 | "file" |
| 171 | ); |
| 172 | await handleFileUpload(compressedfile); |
| 173 | } |
| 174 | }; |
| 175 | |
| 176 | const handleFileUpload = async (file) => { |
| 177 | const size = file.size; |
nothing calls this directly
no test coverage detected