Upload Button Works on Web But Doesn't work on Mobile

Is the problem in Preview or Live - or both? I tried in Preview, and Live on my iPhone and it works fine.

Here’s my code (for what it’s worth):

export function button1_click(event, $w) {
 if ($w("#uploadButton1").value.length > 0) {
        $w("#text1").text = `Uploading ${$w("#uploadButton1").value[0].name}`;
        $w("#uploadButton1").startUpload()
            .then((uploadedFile) => {
                $w("#text1").text = "Upload successful";
                $w("#image1").src = uploadedFile.url;
            })
            .catch((uploadError) => {
                $w("#text1").text = "File upload error";
                console.log(`Error: ${uploadError.errorCode}`);
                console.log(uploadError.errorDescription);
            });
    } else {
        $w("#text1").text = "Please choose a file to upload.";
    }
}