Ejemplo n.º 1
0
        public S3Service(S3ServiceOptions options, ILogger <S3Service> logger)
        {
            if (options.AccessKeyId == null)
            {
                credentials = new AnonymousAWSCredentials();
            }
            else
            {
                credentials = new  BasicAWSCredentials(options.AccessKeyId, options.SecretAccessKey);
            }

            foreach (var m in options.mappings)
            {
                mappings.Add(m);;
            }
            //TODO: verify this sorts longest first
            mappings.Sort((a, b) => b.Prefix.Length.CompareTo(a.Prefix.Length));
        }