Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tencent_cos_plus:1.2.1 使用 注意 #4

Open
Titans1001 opened this issue Sep 21, 2023 · 0 comments
Open

tencent_cos_plus:1.2.1 使用 注意 #4

Titans1001 opened this issue Sep 21, 2023 · 0 comments

Comments

@Titans1001
Copy link

// tencent_cos_plus:1.2.1 使用 注意:

// 1 请求路径拼接问题
// tencent_cos_plus 请求路径: 'https://${bucketName ?? this.bucketName}-${config.appId}.cos.${region ?? this.region}.myqcloud.com/{$objectkey}';
// 其他请求路径 'https://${bucketName ?? this.bucketName}.cos.${region ?? this.region}.myqcloud.com/{$objectkey}';
// 区别在于 bucketName后面是否拼接appId

// 2 签名验证失败问题
// tencent_cos_plus-1.2.1/lib/src/client/cos_client.dart,需要干掉才可以
// 185 行 request.headers['Date'] = formatHttpDate(DateTime.now());

// 3 credential 失效后 COSApiFactory.initialize重新初始化 并不会更新 CosConfig 问题
// tencent_cos_plus-1.2.1 COSApiFactory.initialize 并不会更新 COSConfig 可按如下解决
// tencent_cos_plus_121/lib/src/api/cos_abstract_api.dart
// COSAbstractApi 里添加:
// setConfig(conf){
// config=conf;
// _client.setConfig(conf);
// }
// tencent_cos_plus_121/lib/src/client/cos_client.dart
// _COSClientBase 里添加:
// setConfig(COSConfig conf){
// config = conf;
// }
// tencent_cos_plus_121/lib/src/api/cos_api_factory.dart
// createApi 里添加:
// api.setConfig(config);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant