File upload fix (#12128)

Fix for #12128