Beispiel #1
0
        private Icon BuildIconFromMessage(IconPost iconPost, IPostedFile file)
        {
            Icon icon = new Icon()
            {
                Id   = iconPost.Id,
                Name = iconPost.Name,
                Link = iconPost.Link
            };

            // Force DB name to be correctly formatted
            icon.Name = PortalUtility.UnUrlFormat(PortalUtility.UrlFormat(icon.Name));

            if (file != null)
            {
                icon.Image = PortalUtility.GetImageExtension(file.ContentType);
            }
            return(icon);
        }