diff --git a/furniture-3d-system/src/lib/storage.test.ts b/furniture-3d-system/src/lib/storage.test.ts index 1bc32fba..a9c47040 100644 --- a/furniture-3d-system/src/lib/storage.test.ts +++ b/furniture-3d-system/src/lib/storage.test.ts @@ -31,7 +31,9 @@ jest.mock('qiniu', () => ({ ResumeUploader: jest.fn().mockImplementation(() => ({ putFileV2: mockQiniuResumePutFileV2, })), - PutExtra: jest.fn().mockImplementation(() => ({})), + PutExtra: { + create: jest.fn().mockImplementation(() => ({})), + }, }, rs: { BucketManager: jest.fn().mockImplementation(() => ({ diff --git a/furniture-3d-system/src/lib/storage.ts b/furniture-3d-system/src/lib/storage.ts index 61b82ed4..d900b832 100644 --- a/furniture-3d-system/src/lib/storage.ts +++ b/furniture-3d-system/src/lib/storage.ts @@ -701,7 +701,7 @@ function createQiniuStorageAdapter(): ObjectStorageAdapter { const putPolicy = new sdk.rs.PutPolicy({ scope: `${bucketName}:${objectKey}`, }) - const putExtra = new sdk.resume_up.PutExtra() + const putExtra = sdk.resume_up.PutExtra.create() putExtra.mimeType = contentType const response = await resumeUploader.putFileV2(