This commit is contained in:
2026-07-01 20:21:51 +08:00
parent aea1513836
commit ef6cc18fb2
8 changed files with 178 additions and 20 deletions
@@ -0,0 +1,30 @@
export interface OssUploadTokenInput {
bizType: string;
mediaType: string;
fileName: string;
}
export interface OssUploadTokenResult {
bucket: string;
region: string;
ossKey: string;
url: string;
mock: boolean;
expireAt: string;
mediaType: string;
bizType: string;
/** OSS PostObject 直传 hostmock 时为空 */
host?: string;
/** Base64 policymock 时为空 */
policy?: string;
/** HMAC-SHA1 签名,mock 时为空 */
signature?: string;
/** RAM AccessKeyIdmock 时为空 */
accessKeyId?: string;
}
export interface IOssProvider {
isEnabled(): boolean;
getUploadToken(input: OssUploadTokenInput): OssUploadTokenResult;
buildPublicUrl(ossKey: string): string;
}