Open liuchuancong opened 5 years ago
虽然不影响使用,但是我改了之后但是还是这个问题。
我也不知道如何修改
好吧
private void secretInit() {
new AsyncTask<MethodCall,Void,Void>(){
@Override
protected Void doInBackground(MethodCall... methodCalls) {
MethodCall _call = methodCalls[0];
final String accessKeyId = _call.argument("accessKeyId");
final String accessKeySecret = _call.argument("accessKeySecret");
final String _id = _call.argument("id");
final String securityToken = _call.argument("securityToken");
final OSSCredentialProvider credentialProvider = new OSSStsTokenCredentialProvider(accessKeyId, accessKeySecret, securityToken);
oss = new OSSClient(registrar.context(), (String) _call.argument("endpoint"), credentialProvider);
return null;
}
}.execute(_call);
final String _id = _call.argument("id");
final Map<String, String> m1 = new HashMap();
m1.put("result", "success");
m1.put("id", _id);
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
channel.invokeMethod("onInit", m1);
}
});
}
你值得拥有!
你可以试试pull requests 把你代码提交下
自签名部分我修改源码了不适合,你可以根据此方法修改oninit() 顺便一提
alioss.responseFromUpload.listen((UploadResponse data) {
if (data.success) {
callback('http://$endPoint/$bucketName/${data.key}');
} else {
callback('0');
}
});
这个方法多次调用会将 之前的路径也返回 多次调用有时候会瞬间 返回好几条路径