Manual:$wgAjaxUploadDestCheck

Details
Enable Ajax check for file overwrite, pre-upload.