get image from s3 bucket angular

Solutions on MaxInterview for get image from s3 bucket angular by the best coders in the world

showing results for - "get image from s3 bucket angular"
Manuel
30 Nov 2018
1<section data-ng-controller="myCtrl">
2    <img ng-src="{{s3Url}}{{image.Key}}" width="200px" height="200px" ng-repeat="image in allImageData">
3</section>
4
5$scope.s3Url = 'https://s3-<region>.amazonaws.com/myBucket/';
6var bucket = new AWS.S3({params: {Bucket: 'myBucket'}});
7  bucket.listObjects(function (err, data) {
8    if (err) {
9      console.log(err);
10    } else {
11      console.log(data);
12      $scope.allImageData = data.Contents;
13    }
14  });