How to get data of document attachment using API Juraj Ondrus — Mar 25, 2009 apiapi and internalsinternals This article describes how you can get data of attachment (e.g. file extension) from particular field of current document. To achieve this functionality please use the sample code bellow: using CMS.FileManager; ... Guid attGuid = CMS.GlobalHelper.ValidationHelper.GetGuid( CMSContext.CurrentDocument.GetValue("NameOfFieldWithAttachment"), Guid.Empty); if (attGuid != Guid.Empty) { AttachmentManager am = new AttachmentManager(); AttachmentInfo ai = am.GetAttachmentInfo(attGuid, CMSContext.CurrentSite.SiteName); string attExtension = ai.AttachmentExtension; } See also: devnet.kentico.com/Knowledge-Base/API-and-Internals/How-to-retrieve-an-image-from-the-KenticoCMS-datab.aspx devnet.kentico.com/Knowledge-Base/API-and-Internals/How-to-display-link-to-a-file-or-document-without-.aspxApplies to: Kentico CMS 3.1a Share this article on Twitter Facebook LinkedIn Juraj Ondrus Hi, I am the Technical support leader at Kentico. I'm here to help you use Kentico and get as much as possible out of it.