Small modifications for document upload