Skip to content

Commit 6335c04

Browse files
committed
feat: 파일 타입 변경
1 parent 5d0018a commit 6335c04

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/game-builder/game/application/controllers/game.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class GameController {
115115
validators: [
116116
// jpeg와 png, gif 허용
117117
new FileTypeValidator({
118-
fileType: /jpeg|png|gif|webp|jpg|image\/*/,
118+
fileType: /^image\/|jpeg|png|gif|webp|jpg$/,
119119
}),
120120
new MaxFileSizeValidator({
121121
maxSize: 3 * 1024 * 1024,

src/game-builder/page/application/controllers/page.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export class PageController {
161161
validators: [
162162
// jpeg와 png, gif 허용
163163
new FileTypeValidator({
164-
fileType: /jpeg|png|gif|webp|jpg|image\/*/,
164+
fileType: /^image\/|jpeg|png|gif|webp|jpg$/,
165165
}),
166166
new MaxFileSizeValidator({
167167
maxSize: 7 * 1024 * 1024,

src/user/application/user.controller.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ export class UserController {
135135
@UploadedFile(
136136
new ParseFilePipe({
137137
validators: [
138-
new FileTypeValidator({ fileType: /jpeg|png|gif|webp|jpg|image\/*/ }),
138+
new FileTypeValidator({
139+
fileType: /^image\/|jpeg|png|gif|webp|jpg$/,
140+
}),
139141
],
140142
fileIsRequired: false,
141143
}),

0 commit comments

Comments
 (0)