Exemple #1
0
        public HttpResponseMessage Get(string id)
        {
            var result = new HttpResponseMessage(HttpStatusCode.OK);

            var stream = _system.GetStreamFromFileResource(id) as MemoryStream;

            if (stream != null)
            {
                result.Content = new ByteArrayContent(stream.ToArray());
            }
            return(result);
        }