· 9 years ago · Oct 16, 2016, 02:00 PM
1public void ImageToAWS(IFormFile image, string imageName, string accesskey, string secretKey, string bucketname)
2 {
3 TransferUtility transferUtility = new TransferUtility(new AmazonS3Client(
4 accesskey,
5 secretKey,
6 Amazon.RegionEndpoint.EUCentral1
7 ));
8
9 transferUtility.Upload(image.OpenReadStream(), bucketname, imageName);
10 }