예제 #1
0
        //
        // GET: /Product/GetImage/5

        public FileContentResult GetImage(int id)
        {
            var fileList = files.GetFiles(id);

            if (fileList.Count() > 0)
            {
                return(File(fileList.ElementAt(0).Data.ToArray(),
                            fileList.ElementAt(0).ContentType));
            }
            else
            {
                return(null);
            }
        }