Beispiel #1
0
        private async Task UploadToS3(Stream data, NovelGramPhoto photo, bool isThumbnail)
        {
            string key = GetKey(photo, isThumbnail);

            await this.transferUtility.UploadAsync(data, "novelgram", key, CancellationToken.None);

            this.logger.LogInformation($"Uploaded photo {photo.Key}");
        }
Beispiel #2
0
 private static string GetKey(NovelGramPhoto photo, bool isThumbnail) => isThumbnail ? photo.ThumbnailKey : photo.Key;