public async Task PostAsync(S3FileKey key, TValue source) { if (key == null) { throw new ArgumentNullException(nameof(key)); } if (source == null) { throw new ArgumentNullException(nameof(source)); } var stream = _containerConverter.GetStream(source); var metaData = _containerConverter.GetMetaData(source); stream.Position = 0; var request = new PutObjectRequest { BucketName = BucketNameConstructor.GetBucketName(key), Key = key.Key, InputStream = stream, TagSet = metaData.ToTagSet(_containerConverter.GetOriginKey()).ToList(), AutoCloseStream = false }; metaData.CopyToMetadataCollection(request.Metadata, _containerConverter.GetOriginKey()); await AmazonS3.PutObjectAsync(request); stream.Position = 0; }