Fix document upload functional tests