Skip to content

Commit

Permalink
fix name from originBucekerName to originBucketName (#1114)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaoyaoio authored Apr 1, 2024
1 parent 692e756 commit f9d266a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/service/common/file/multer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const getUploadModel = ({ maxSize = 500 }: { maxSize?: number }) => {
async doUpload<T = Record<string, any>>(
req: NextApiRequest,
res: NextApiResponse,
originBuckerName?: `${BucketNameEnum}`
originBucketName?: `${BucketNameEnum}`
) {
return new Promise<{
file: FileType;
Expand All @@ -52,7 +52,7 @@ export const getUploadModel = ({ maxSize = 500 }: { maxSize?: number }) => {
}

// check bucket name
const bucketName = (req.body?.bucketName || originBuckerName) as `${BucketNameEnum}`;
const bucketName = (req.body?.bucketName || originBucketName) as `${BucketNameEnum}`;
if (bucketName && !bucketNameMap[bucketName]) {
return reject('BucketName is invalid');
}
Expand Down

0 comments on commit f9d266a

Please sign in to comment.