Example #1
0
        public string GetItemUrl(MediaItem item)
        {
            if (DownloadFiles)
            {
                return("~/Home/GetFile/" + item.Id);
            }

            var folderPath = "";

            if (item is MediaFolder)
            {
                folderPath = item.Thumbnail;
            }
            else
            {
                var folderId = GetCurrentFolderId();
                if (folderId.HasValue)
                {
                    folderPath = GetFolderPath(folderId.Value, null);
                }

                folderPath = Path.Combine(folderPath, item.Thumbnail);
            }

            return(_fileClient.GetFileUrl(folderPath));
        }