Replace SharePoint attachment paperclip icons with actual hyperlinked attachment names in list views

You can attach documents to SharePoint list items. However if you add the “Attachments” column to your list views, you get a column that only shows a paperclip icon (see below) if there are any attachments. Clicking that paperclip also won’t open any attachment or the list item to view them. It’s strictly an image.

attachment paperclip

Here’s how you can replace that paperclip on each row with the actual name(s) of your attachment(s) linked to the actual attachment(s).

Download this code, or copy and paste it into a new file in your Site Assets folder as ShowAttachments.js:

When on the list view for which you’re wanting to show attachments, edit the page (settings wheel –> edit page).
chrome_2018-07-20_09-22-11

Add a web part.
chrome_2018-07-20_09-23-09

Add a content editor web part.
chrome_2018-07-20_09-23-35

Paste the URL to the script you saved earlier in the Content Link box.
showattachments

Expand “Appearance” and set Chrome Type to “None” and click OK.
chrome_2018-07-20_09-24-48

Save the page/stop editing.
chrome_2018-07-20_09-25-11

That’s all there is to it!
show attachments

Advertisements