Fix document upload