Skip to content

Commit

Permalink
fix(virtual-background) fix image upload cancelling
Browse files Browse the repository at this point in the history
Fixes: #15520
  • Loading branch information
saghul committed Jan 24, 2025
1 parent 4861f95 commit 4e033ff
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,14 @@ function UploadImageButton({


const uploadImage = useCallback(async e => {
const reader = new FileReader();
const imageFile = e.target.files;

if (!imageFile) {
return;
}

const reader = new FileReader();

reader.readAsDataURL(imageFile[0]);
reader.onload = async () => {
const url = await resizeImage(reader.result);
Expand Down

0 comments on commit 4e033ff

Please sign in to comment.