If you look at a Document Library View, you will also notice Document Type column which shows the icon corresponding to the Document Type. If it is a word document, it shows MS Word symbol as shown below. Document Icon is highlighted There could be scenarios where you would need to display the documents in a custom view and you would also want to make use of these icons. However this is not a very straightforward approach and this post will show you how to get that! I was using REST API to get items from the library. So obviously I was looking at any column which would give me access to these icons. When I got into the columns in the response, the one which caught my attention was the field "DocIcon". But, this field contains only the extension of the document. For example, "docx", "html", "jpg" etc. So DocIcon was of no use as I wanted to get the image URL. I also started looking at any endpoint which would get me this URL. During t...
SharePoint | SharePoint Online | Angular | jQuery | REST | JSOM | Power Automate | Flow | Power Apps