diff --git a/es/utils/cos/aliyun.backend.js b/es/utils/cos/aliyun.backend.js index c8903a2d8..eb7ae2491 100644 --- a/es/utils/cos/aliyun.backend.js +++ b/es/utils/cos/aliyun.backend.js @@ -112,6 +112,7 @@ export default class ALiYunBackend extends ALiYun { timeout: 30 * 1000, // 30 seconds ...(useSts ? stsInfo : {}), + expires: 3 * 24 * 60 * 60, // 3 days }); return { uploadId: preInit.uploadId, diff --git a/es/utils/cos/s3.backend.js b/es/utils/cos/s3.backend.js index e33fa75cb..502600d68 100644 --- a/es/utils/cos/s3.backend.js +++ b/es/utils/cos/s3.backend.js @@ -100,7 +100,7 @@ export default class S3Backend extends S3 { const { instance, config: s3Config } = this.getConfigAndInstance(application, extraFile.bucket); const preInit = await instance.prepareMultipartUpload(extraFile.bucket, key, extraFile.chunkInfo?.partCount, { endpoint: s3Config.endpoint, - expiresIn: 30 * 1000, // 30 seconds + expiresIn: 3 * 24 * 60 * 60, // 3 days }); return { uploadId: preInit.uploadId, diff --git a/lib/utils/cos/aliyun.backend.js b/lib/utils/cos/aliyun.backend.js index e659ac986..9a1feb343 100644 --- a/lib/utils/cos/aliyun.backend.js +++ b/lib/utils/cos/aliyun.backend.js @@ -115,6 +115,7 @@ class ALiYunBackend extends aliyun_1.default { timeout: 30 * 1000, // 30 seconds ...(useSts ? stsInfo : {}), + expires: 3 * 24 * 60 * 60, // 3 days }); return { uploadId: preInit.uploadId, diff --git a/lib/utils/cos/s3.backend.js b/lib/utils/cos/s3.backend.js index 03af79c3f..a03b561ad 100644 --- a/lib/utils/cos/s3.backend.js +++ b/lib/utils/cos/s3.backend.js @@ -103,7 +103,7 @@ class S3Backend extends s3_1.default { const { instance, config: s3Config } = this.getConfigAndInstance(application, extraFile.bucket); const preInit = await instance.prepareMultipartUpload(extraFile.bucket, key, extraFile.chunkInfo?.partCount, { endpoint: s3Config.endpoint, - expiresIn: 30 * 1000, // 30 seconds + expiresIn: 3 * 24 * 60 * 60, // 3 days }); return { uploadId: preInit.uploadId, diff --git a/src/utils/cos/aliyun.backend.ts b/src/utils/cos/aliyun.backend.ts index 63348ab2e..62c477b28 100644 --- a/src/utils/cos/aliyun.backend.ts +++ b/src/utils/cos/aliyun.backend.ts @@ -190,6 +190,7 @@ export default class ALiYunBackend timeout: 30 * 1000, // 30 seconds ...(useSts ? stsInfo : {}), + expires: 3 * 24 * 60 * 60, // 3 days } ) diff --git a/src/utils/cos/s3.backend.ts b/src/utils/cos/s3.backend.ts index 9143fc5b8..c999c3a8a 100644 --- a/src/utils/cos/s3.backend.ts +++ b/src/utils/cos/s3.backend.ts @@ -190,7 +190,7 @@ export default class S3Backend extends S3 implements CosBackend { extraFile.chunkInfo?.partCount!, { endpoint: s3Config.endpoint, - expiresIn: 30 * 1000, // 30 seconds + expiresIn: 3 * 24 * 60 * 60, // 3 days } )