|
@@ -14,24 +14,22 @@ import { BucketManager } from './Component/BucketManager'
|
14
|
14
|
import { ObjectManager } from './Component/ObjectManager'
|
15
|
15
|
|
16
|
16
|
import AliyunOSS from 'aliyun-oss-react-native'
|
|
17
|
+
|
17
|
18
|
//open log
|
18
|
19
|
AliyunOSS.enableDevMode()
|
|
20
|
+
|
19
|
21
|
// defalut configraiton
|
20
|
22
|
const configuration = {
|
21
|
23
|
maxRetryCount: 3,
|
22
|
24
|
timeoutIntervalForRequest: 30,
|
23
|
25
|
timeoutIntervalForResource: 24 * 60 * 60
|
24
|
26
|
};
|
25
|
|
-const config = {
|
26
|
|
- AccessKey: 'XXX',
|
27
|
|
- SecretKey: 'XXX',
|
28
|
|
-};
|
29
|
|
-const endPoint = 'oss-cn-zhangjiakou.aliyuncs.com';
|
30
|
|
-const companyserver = "http://XXX:PORT";
|
31
|
|
-const familyserver = "http://XXX:PORT";
|
32
|
27
|
|
33
|
|
-// AliyunOSS.initWithPlainTextAccessKey(config.AccessKey, config.SecretKey, endPoint, configuration);
|
34
|
|
-AliyunOSS.initWithServerSTS(familyserver,endPoint, configuration)
|
|
28
|
+const endPoint = 'oss-cn-XXX.aliyuncs.com';
|
|
29
|
+const authserver = "http://XXX:PORT";
|
|
30
|
+
|
|
31
|
+// initWithServerSTS to auth
|
|
32
|
+AliyunOSS.initWithServerSTS(authserver,endPoint, configuration)
|
35
|
33
|
|
36
|
34
|
type Props = {};
|
37
|
35
|
|