Blog.Logic.Core.MediaLogic.PrepareMediaForAdding C# (CSharp) Method

PrepareMediaForAdding() private static method

private static PrepareMediaForAdding ( string filename, int albumId, string mediaPath, int userId, string contentType, string customName ) : Blog.Common.Contracts.Media
filename string
albumId int
mediaPath string
userId int
contentType string
customName string
return Blog.Common.Contracts.Media
        private static Media PrepareMediaForAdding(string filename, int albumId, string mediaPath, int userId, string contentType, string customName)
        {
            var media = new Media
            {
                FileName = filename,
                AlbumId = albumId,
                MediaPath = mediaPath,
                ThumbnailPath = mediaPath + "tn\\",
                CustomName = customName
            };
            media.ThumbnailUrl = Constants.FileMediaUrl + media.CustomName + @"/thumb";
            media.MediaUrl = Constants.FileMediaUrl + media.CustomName;
            media.MediaType = contentType;

            return media;
        }