how we can fetch the document extension name and document type in when we upload something on UI
Discussion posts and replies are publicly visible
Not. You do that in the process model.