fix(录音): 七牛 bucket 'gameauio'→'gameaudio'(原webviewActivity拼写错误)
真机上传 631 no-such-bucket 根因:抄了 webviewActivity 的 typo 'gameauio'(无d)。 区域查询确认正确 bucket 是 'gameaudio'(有d,与回放域名 gameaudio.daoqi88.cn + NewwebviewActivity 一致),region z0/华东,up host upload.qiniup.com。同步改单测断言。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
1432fa25a1
commit
1bea5a3598
@@ -14,7 +14,7 @@ export default function QiniuTokenTest() {
|
||||
const std: string = parts[2].replace(/-/g, '+').replace(/_/g, '/');
|
||||
const decoded: Uint8Array = helper.decodeSync(std);
|
||||
const policy: string = String.fromCharCode.apply(null, Array.from(decoded));
|
||||
expect(policy.indexOf('"scope":"gameauio"') >= 0).assertTrue();
|
||||
expect(policy.indexOf('"scope":"gameaudio"') >= 0).assertTrue();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -9,7 +9,9 @@ import { buffer, util } from '@kit.ArkTS';
|
||||
export class QiniuToken {
|
||||
private static readonly ACCESS_KEY: string = 'ngN3rFW1j8dn7ZGpATKl7mreaNmp2Ei_l9AIhkIf';
|
||||
private static readonly SECRET_KEY: string = '6VXav9eqUCORJTYvTFOeTVRonAyk4Hrs-PIZ8jmZ';
|
||||
private static readonly BUCKET: string = 'gameauio';
|
||||
// bucket 取 'gameaudio'(有 d,与回放域名 gameaudio.daoqi88.cn / Android NewwebviewActivity 一致);
|
||||
// 原 webviewActivity 里的 'gameauio'(无 d) 是拼写错误,七牛上无该 bucket(区域查询 no such bucket)。
|
||||
private static readonly BUCKET: string = 'gameaudio';
|
||||
|
||||
/** 生成 uploadToken(deadline=now+1h)。 */
|
||||
static async uploadToken(): Promise<string> {
|
||||
|
||||
Reference in New Issue
Block a user