web端打通oss资源上传

This commit is contained in:
2026-07-01 21:46:36 +08:00
parent ef6cc18fb2
commit 139e37651b
22 changed files with 1186 additions and 40 deletions
@@ -23,8 +23,25 @@ export interface OssUploadTokenResult {
accessKeyId?: string;
}
export interface OssPutObjectInput {
bizType: string;
mediaType: string;
fileName: string;
buffer: Buffer;
mimeType?: string;
}
export interface OssPutObjectResult {
bucket: string;
region: string;
ossKey: string;
url: string;
mock: boolean;
}
export interface IOssProvider {
isEnabled(): boolean;
getUploadToken(input: OssUploadTokenInput): OssUploadTokenResult;
putObject(input: OssPutObjectInput): Promise<OssPutObjectResult>;
buildPublicUrl(ossKey: string): string;
}