예제 #1
0
        public ActionResult GetImageById(int id)
        {
            var image = _imageLogic.GetById(id);

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

            var path = Path.Combine(Server.MapPath(_imagePath), image.Path);

            return(File(path, image.MimeType));
        }
        public ActionResult GetById(Guid id)
        {
            var image = _imageLogic.GetById(id);

            return(image == null ? null : new FileContentResult(image.Data, image.MimeType));
        }