From ac35a6ec45b1409561ddd0ef991b6f3301d0d45f Mon Sep 17 00:00:00 2001 From: undefined Date: Sun, 1 Dec 2024 17:33:47 +0800 Subject: [PATCH] core: sb aliyun --- packages/hydrooj/src/service/storage.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/hydrooj/src/service/storage.ts b/packages/hydrooj/src/service/storage.ts index 06b7c54df..f11126622 100644 --- a/packages/hydrooj/src/service/storage.ts +++ b/packages/hydrooj/src/service/storage.ts @@ -209,7 +209,8 @@ class RemoteStorageService { Key: target, ResponseContentDisposition: filename ? `attachment; filename="${encodeRFC5987ValueChars(filename)}"` : '', }), { - expiresIn: noExpire ? 24 * 60 * 60 * 7 : 10 * 60, + // aliyun s3 will reject download if expires >= 7 days + expiresIn: noExpire ? 24 * 60 * 60 * 7 - 1 : 10 * 60, }); // using something like /fs/ if (useAlternativeEndpointFor && this.replaceWithAlternativeUrlFor[useAlternativeEndpointFor]) {