Commit 0a045867 authored by christ's avatar christ

sharebug

parent 227dd07f
...@@ -49,22 +49,31 @@ class Common ...@@ -49,22 +49,31 @@ class Common
*/ */
public static function getOssClient() public static function getOssClient()
{ {
if(APP_ENV=='product' || APP_ENV=='productOne'){ try {
return self::getOssClientOnline(); $ossClient = new OssClient(self::accessKeyId, self::accessKeySecret, self::endpoint, false);
}else{ } catch (OssException $e) {
return self::getOssClientPre(); printf(__FUNCTION__ . "creating OssClient instance: FAILED\n");
printf($e->getMessage() . "\n");
return null;
} }
return $ossClient;
// if(APP_ENV=='product' || APP_ENV=='productOne'){
// return self::getOssClientOnline();
// }else{
// return self::getOssClientPre();
// }
} }
public static function getBucketName() public static function getBucketName()
{ {
if(APP_ENV=='product' || APP_ENV=='productOne'){ return self::bucket;
return self::bucket; // if(APP_ENV=='product' || APP_ENV=='productOne'){
}else{ // return self::bucket;
return self::buketPre; // }else{
} // return self::buketPre;
// }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment