Codice PHP:
if($_FILES['file']['error'] == 4) die("Nessun file caricato");