public async Task <ImageSummary> PutImage(byte[] fileContent, string fileName, string contentType, string folder)
        {
            _log.LogInformation($"PutImage {fileName} size {fileContent.Length} bytes, contentType {contentType}, folder {folder}");

            using (var stream = new MemoryStream(fileContent))
            {
                var summary = ImageTransform.CreateImageSummary(fileName, stream);

                var request = new PutObjectRequest
                {
                    BucketName  = _options.FullImage,
                    Key         = summary.Id,
                    ContentType = contentType,
                    InputStream = stream
                };

                _log.LogInformation("begin put image");
                PutObjectResponse response = await _s3client.PutObjectAsync(request);

                _log.LogInformation("put image completes");

                //TODO can probably reuse stream
                using (var outStream = new MemoryStream(fileContent))
                {
                    await PutThumbnail(summary, outStream);
                }
                return(summary);
            }
        }
 public async Task ReIndex()
 {
     foreach (var item in await BuildImageSummariesFromS3(new FilterCriteria()))
     {
         try
         {
             using (var imageStream = await GetImageStream(ImageType.FullImage, item))
             {
                 var summary = ImageTransform.CreateImageSummary(item, imageStream);
                 imageStream.Position = 0;
                 await PutThumbnail(summary, imageStream);
             }
         }
         catch (Exception ex)
         {
             _log.LogError(ex, $"Error building thumbnail for item {item}");
         }
     }
 }