fix: 分片预签名过期时间3天

This commit is contained in:
Pan Qiancheng 2025-12-26 23:44:17 +08:00
parent 066d834d8d
commit df9855906d
6 changed files with 6 additions and 3 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -190,6 +190,7 @@ export default class ALiYunBackend
timeout: 30 * 1000, // 30 seconds
...(useSts ? stsInfo
: {}),
expires: 3 * 24 * 60 * 60, // 3 days
}
)

View File

@ -190,7 +190,7 @@ export default class S3Backend extends S3 implements CosBackend<EntityDict> {
extraFile.chunkInfo?.partCount!,
{
endpoint: s3Config.endpoint,
expiresIn: 30 * 1000, // 30 seconds
expiresIn: 3 * 24 * 60 * 60, // 3 days
}
)