Beispiel #1
0
        public static bool Verify(this OssConfig config)
        {
            if (config == null)
            {
                throw new ArgumentNullException(nameof(config));
            }

            try
            {
                var client = new OssClient(config.OssEndpoint, config.AccessKeyId, config.AccessKeySecret);
                var info   = client.GetBucketInfo(config.BucketName);
                return(info != null);
            }
            catch
            {
                return(false);
            }
        }
Beispiel #2
0
 public AliyunOSSFileSystemClient(Guid runtimeId, OssConfig config)
 {
     RuntimeId  = runtimeId;
     _OssConfig = config;
 }