Hai provato a fare un

if

campo file vuoto

then

passa solo il campo text

else

scrivi il codice per il text e per l'upload

end if