fixes #5311 #5312
Merge pull request #5354 from dotCMS/issue-5311-form-with-file-fields-hangs-on-repeated-submit

fixes #5311 #5312