Пример #1
0
        public ActionResult RawBlob(
            string branch, string path)
        {
            var repository = new GitVersioningSystem(path, branch);

            var content = repository.GetBlobContent();

            if (content == null)
            {
                return(HttpNotFound());
            }

            return(File(content.RawContent, "application/octet-stream", content.FileName));
        }
Пример #2
0
        public ActionResult Blob(
            string branch, string path)
        {
            var repository = new GitVersioningSystem(path, branch);

            var content = repository.GetBlobContent();

            if (content == null)
            {
                return(HttpNotFound());
            }

            content.RawUrl = Url.Action("RawBlob", new { branch, path });

            return(View(content));
        }