Пример #1
0
        public IHttpActionResult Get(int id)
        {
            Stream      stream;
            PreviewFile previewFile = _tenantsRepository.GetPreviewFile(entityId: id, out stream);

            if (stream == null || previewFile == null)
            {
                return(NotFound());
            }
            return(new ContentStreamActionResult(Request,
                                                 previewFile.FileName,
                                                 previewFile.ContentType,
                                                 stream));
        }