public async Task <string> ReadAllText(string uriString) { _logger.LogDebug($"Read all text for '{uriString}'."); var amazonS3Uri = AmazonS3UriExtensions.ParseAmazonS3Uri(uriString); var ms = await GetObjectStream(amazonS3Uri.Bucket, amazonS3Uri.Key, null); var bytes = ms.ToArray(); var text = Encoding.UTF8.GetString(bytes); ms.Dispose(); _logger.LogDebug($"Read all text for '{uriString}' done."); return(text); }
public async Task <List <S3ObjectModel> > ListObjectsAsync(string uriString) { var amazonS3Uri = AmazonS3UriExtensions.ParseAmazonS3Uri(uriString); return(await ListObjectsAsync(amazonS3Uri.Bucket, amazonS3Uri.Key)); }