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
f9d266a6
authored
Apr 01, 2024
by
Yao Yao
Committed by
GitHub
Apr 01, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix name from originBucekerName to originBucketName (#1114)
parent
692e7562
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
packages/service/common/file/multer.ts
+2
-2
No files found.
packages/service/common/file/multer.ts
View file @
f9d266a6
...
@@ -37,7 +37,7 @@ export const getUploadModel = ({ maxSize = 500 }: { maxSize?: number }) => {
...
@@ -37,7 +37,7 @@ export const getUploadModel = ({ maxSize = 500 }: { maxSize?: number }) => {
async
doUpload
<
T
=
Record
<
string
,
any
>>
(
async
doUpload
<
T
=
Record
<
string
,
any
>>
(
req
:
NextApiRequest
,
req
:
NextApiRequest
,
res
:
NextApiResponse
,
res
:
NextApiResponse
,
originBucke
r
Name
?:
`
${
BucketNameEnum
}
`
originBucke
t
Name
?:
`
${
BucketNameEnum
}
`
)
{
)
{
return
new
Promise
<
{
return
new
Promise
<
{
file
:
FileType
;
file
:
FileType
;
...
@@ -52,7 +52,7 @@ export const getUploadModel = ({ maxSize = 500 }: { maxSize?: number }) => {
...
@@ -52,7 +52,7 @@ export const getUploadModel = ({ maxSize = 500 }: { maxSize?: number }) => {
}
}
// check bucket name
// check bucket name
const
bucketName
=
(
req
.
body
?.
bucketName
||
originBucke
r
Name
)
as
`
${
BucketNameEnum
}
`
;
const
bucketName
=
(
req
.
body
?.
bucketName
||
originBucke
t
Name
)
as
`
${
BucketNameEnum
}
`
;
if
(
bucketName
&&
!
bucketNameMap
[
bucketName
])
{
if
(
bucketName
&&
!
bucketNameMap
[
bucketName
])
{
return
reject
(
'BucketName is invalid'
);
return
reject
(
'BucketName is invalid'
);
}
}
...
...
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