Avoid error messages.
Merge pull request #5981 from openscholar/5924

Avoid error messages when replacing file va AJAX modal.