Closed sridharsaminathan closed 7 years ago
Hi @sridharsaminathan this version the SDK has been deprecated and rolled into the .NET SDK. Check out these resources: GitHub: https://github.com/aws/aws-sdk-net Installation: https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/net-dg-install-assemblies.html Official Forums: http://forums.aws.amazon.com/forum.jspa?forumID=61 Documentation: https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/
Thanks, TEW
Hi,
Thanks @tawalke. i have added AWSSDK.S3 from nuget packages
I have added the following code for downloading file Amazon S3. For S3Client i have used identity pool id with region. i am not getting response here var response = await S3Client.GetObjectAsync(request) .
Please find the code and help me to fix.
var S3Client = S3Utils.S3Client; bool responseBody = false; var request = new GetObjectRequest { BucketName = Constants.AWS.BUCKET_NAME.ToLowerInvariant(), Key = string.Format("{0}/{1}", Constants.AWS.FOLDER_NAME.ToLowerInvariant(), filename) }; try { using (var response = await S3Client.GetObjectAsync(request)) { string avatarFilepath = System.IO.Path.Combine(App.PersonalFolderPath, filename); await response.WriteResponseStreamToFileAsync(avatarFilepath, true); responseBody = true; } } catch (AmazonS3Exception s3Exception) { responseBody = false; } return responseBody;
Thanks, Sridhar
i have got network issue it is resolved now
Hi,
I need to download a file in Amazon S3 in Xamarin android and Xamarin iOS. please help