I am getting the below error message with this code to verify if the uploaded files are pdf and send via phpmailer.

Line 66 is where the "default:" at. If I delete default i get "die" error if i delete the next line become error and so on. Can someone please help. thx.


Code:
Parse error: syntax error, unexpected 'default' (T_DEFAULT) in /test.php on line 66
PHP Code:
    if ($_FILES['upload']['error'] !== UPLOAD_ERR_OK) {
    die(
"Upload failed with error " $_FILES['upload']['error']);
    }
    
$finfo finfo_open(FILEINFO_MIME_TYPE);
    
$mime finfo_file($finfo$_FILES['upload']['tmp_name']);
    
$ok false;
    switch (
$mime) {
   case 
'application/pdf'
   
default:
       die(
"Unknown/not permitted file type");
    
$ok true;
        foreach(
$_FILES['upload']['tmp_name'] as $uploadfile
        
$mail->AddAttachment($uploadfile);
    }
    }