Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
af7e740b
authored
Jul 09, 2026
by
Archer
Committed by
GitHub
Jul 09, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: clamp uploaded file access url expiration (#7289)
parent
69120fc8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
packages/service/common/s3/buckets/base.ts
+2
-2
pro
+1
-1
No files found.
packages/service/common/s3/buckets/base.ts
View file @
af7e740b
...
...
@@ -16,7 +16,7 @@ import { S3ErrEnum } from '@fastgpt/global/common/error/code/s3';
import
{
createUploadConstraints
}
from
'../utils/uploadConstraints'
;
import
path
from
'node:path'
;
import
{
MongoS3TTL
}
from
'../models/ttl'
;
import
{
addHours
,
addMinutes
,
differenceInSeconds
}
from
'date-fns'
;
import
{
addHours
,
addMinutes
,
differenceIn
Hours
,
differenceIn
Seconds
}
from
'date-fns'
;
import
{
getLogger
,
LogCategories
}
from
'../../logger'
;
import
{
addS3DelJob
}
from
'../queue/delete'
;
import
{
type
UploadFileByBufferParams
,
UploadFileByBodySchema
}
from
'../contracts/type'
;
...
...
@@ -314,7 +314,7 @@ export class S3BaseBucket {
key
,
accessUrl
:
await
this
.
createExternalUrl
({
key
,
expiredHours
:
2
expiredHours
:
Math
.
max
(
1
,
differenceInHours
(
expiredTime
,
new
Date
()))
})
};
}
...
...
pro
@
2900ffe1
Subproject commit
f104fb8433feea4719d3ec742bece0aa0b91b3d3
Subproject commit
2900ffe15207cea0755c6d60dd5752ee41c261e6
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment