|
|
@@ -18,21 +18,21 @@ namespace MySystem
|
|
|
public string endpoint = ConfigurationManager.AppSettings["OSSEndpoint"].ToString(); //endpoint
|
|
|
public string bucketName = ConfigurationManager.AppSettings["OSSBucketName"].ToString();
|
|
|
public string SourceHost = "";
|
|
|
- public bool OssStatus = false;
|
|
|
+ public bool OssStatus = true;
|
|
|
public readonly static OssHelper Instance = new OssHelper();
|
|
|
private OssHelper()
|
|
|
{
|
|
|
- SystemSet set = new WebCMSEntities().SystemSet.FirstOrDefault() ?? new SystemSet();
|
|
|
- if (set.UploadOss == 1)
|
|
|
- {
|
|
|
- SourceHost = "http://" + ConfigurationManager.AppSettings["OSSBucketName"].ToString() + "." + ConfigurationManager.AppSettings["OSSEndpoint"].ToString();
|
|
|
- OssStatus = true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- SourceHost = "";
|
|
|
- OssStatus = false;
|
|
|
- }
|
|
|
+ // SystemSet set = new WebCMSEntities().SystemSet.FirstOrDefault() ?? new SystemSet();
|
|
|
+ // if (set.UploadOss == 1)
|
|
|
+ // {
|
|
|
+ // SourceHost = "http://" + ConfigurationManager.AppSettings["OSSBucketName"].ToString() + "." + ConfigurationManager.AppSettings["OSSEndpoint"].ToString();
|
|
|
+ // OssStatus = true;
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // SourceHost = "";
|
|
|
+ // OssStatus = false;
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
public void Start()//启动
|