门店开通流程

This commit is contained in:
2026-07-03 14:53:21 +08:00
parent c7dc6a2274
commit f2175b83f7
24 changed files with 1451 additions and 186 deletions
@@ -6,7 +6,7 @@ import type {
OssUploadTokenInput,
OssUploadTokenResult,
} from './oss.interface';
import { buildOssObjectKey } from './oss.key.util';
import { buildOssObjectKey, resolveOssUploadDir } from './oss.key.util';
import { createAliyunOssClient, resolveOssUploadHost } from './oss.aliyun.client';
const DEFAULT_EXPIRE_SECONDS = 15 * 60;
@@ -64,13 +64,14 @@ export class OssAliyunProvider implements IOssProvider {
const ossKey = buildOssObjectKey(this.uploadPrefix, dto.bizType, dto.fileName);
const expireAt = new Date(Date.now() + this.expireSeconds * 1000);
const host = resolveOssUploadHost(this.bucket, this.region);
const keyPrefix = resolveOssUploadDir(this.uploadPrefix, dto.bizType);
const policy = {
expiration: expireAt.toISOString(),
conditions: [
['content-length-range', 0, this.maxUploadBytes],
['eq', '$bucket', this.bucket],
['starts-with', '$key', `${this.uploadPrefix}/${dto.bizType.toLowerCase()}/`],
['starts-with', '$key', keyPrefix],
],
};