fix(virtual-background) fix image upload cancelling

Fixes: https://github.com/jitsi/jitsi-meet/issues/15520
This commit is contained in:
Saúl Ibarra Corretgé
2025-01-24 09:42:53 +01:00
committed by Saúl Ibarra Corretgé
parent 4861f95368
commit 4e033fff4b

View File

@@ -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);