file api for document types in upload