[英]How to download a file as Byte Array from AWS S3 Storage?
I can download a file from the Amazon S3 Storage with below code,我可以使用以下代码从 Amazon S3 存储下载文件,
var s3Client = new AmazonS3Client(txt_Accesskey.Text, txt_Secretkey.Text, bucketRegion);
GetObjectRequest request = new GetObjectRequest();
request.BucketName = bucketName;
request.Key = "Sample.txt";
GetObjectResponse response = s3Client.GetObject(request);
response.WriteResponseStreamToFile(@"C:\Desktop\Sample.txt");
But, I want to download these files as Byte Array.但是,我想将这些文件下载为字节数组。 Can anyone please give me a solution for this?任何人都可以请给我一个解决方案吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.