Update upload.php to check if request from ajax