I/flutter ( 3569):
I/flutter ( 3569): InvalidAccessKeyId
I/flutter ( 3569): The OSS Access Key Id you provided does not exist in our records. The Security Token may be lost to specify that it is a STS Access Id.
I/flutter ( 3569): 64DCFBB694C77F3830309BB0
I/flutter ( 3569): paper-data-uat.oss-cn-hangzhou.aliyuncs.com
I/flutter ( 3569): STS.NUQrpkhEPr98RDscmwTiUMKdc
I/flutter ( 3569): 0002-00000003
I/flutter ( 3569):
I/flutter ( 3569):
I/flutter ( 3569): The OSS Access Key Id you provided does not exist in our records. The Security Token may be lost to specify that it is a STS Access Id.
I/flutter ( 3569): 64DCFBB694C77F3830309BB0
I/flutter ( 3569): paper-data-uat.oss-cn-hangzhou.aliyuncs.com
I/flutter ( 3569): STS.NUQrpkhEPr98RDscmwTiUMKdc
I/flutter ( 3569): 0002-00000003
I/flutter ( 3569):
InvalidAccessKeyId
I/flutter ( 3569):这是初始化的代码;
/// 初始化aliyun oss
OSSClient.init( endpoint: resp.data.endpoint, bucket: resp.data.bucket, credentials: () { // Or Credentials Config return Future.value(Credentials( accessKeyId: resp.data.accessKeyId, accessKeySecret: resp.data.accessKeySecret, securityToken: resp.data.stsToken )); }, );
这是上传的代码:
final object = await OSSClient().putObject( object: OSSImageObject.fromFile(file: File(path)), bucket: state.bucket, // String? endpoint: state.endpoint, // String? );
不明白为什么这里还要设置bucket和endpoint