Introduce function to create links to attachments.