v4.0.15上传图片自动压缩
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
DEFAULT_OSS_MAX_UPLOAD_BYTES,
|
||||
formatOssMaxSizeMb,
|
||||
} from '@dukang/shared-ui/compressImage';
|
||||
import type { OssUploadImageMeta } from '@dukang/shared-types';
|
||||
|
||||
export type OssMediaType = 'IMAGE' | 'VIDEO' | 'FILE';
|
||||
|
||||
@@ -12,6 +13,7 @@ export type UploadFileResult = {
|
||||
ossKey: string;
|
||||
bucket: string;
|
||||
mock: boolean;
|
||||
image?: OssUploadImageMeta;
|
||||
};
|
||||
|
||||
async function prepareUploadFile(file: File, mediaType: OssMediaType): Promise<File> {
|
||||
|
||||
Reference in New Issue
Block a user