Example #1
0
        public MoviesController(_300910377_KAUR__300916412_YANG__Lab2Context context, IConfiguration conf)
        {
            _context = context;

            bucketName = conf.GetSection("AWS").GetSection("BucketName").Value;

            var awsOptions  = conf.GetAWSOptions();
            var profileName = awsOptions.Profile;

            CredentialProfile           credentialProfile;
            AWSCredentials              aWSCredentials;
            CredentialProfileStoreChain chain = new CredentialProfileStoreChain();

            chain.TryGetAWSCredentials(profileName, out aWSCredentials);
            chain.TryGetProfile(profileName, out credentialProfile);


            s3Client = new AmazonS3Client(aWSCredentials, awsOptions.Region);
        }
 public HomeController(_300910377_KAUR__300916412_YANG__Lab2Context context)
 {
     _context = context;
 }
Example #3
0
 public UserMoviesController(_300910377_KAUR__300916412_YANG__Lab2Context context)
 {
     _context = context;
 }