Example #1
0
        private async Task UploadEntry(ZipArchiveEntry entry, string bucket, string role)
        {
            using var stream = entry.OpenInReadMode();
            var request = new PutObjectRequest
            {
                BucketName  = bucket,
                Key         = entry.FullName,
                InputStream = stream,
                TagSet      = new List <Tag> {
                },
            };

            request.Headers.ContentLength = entry.Length;
            await s3Client.PutObjectAsync(request);

            logger.LogInformation($"Uploaded {entry.FullName}");
        }