Skip to content

Commit

Permalink
chore(be): remove file extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaehyeon1020 committed Apr 1, 2024
1 parent 0d32955 commit af56564
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/backend/apps/admin/src/problem/problem.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ export class ProblemService {
}

async uploadImage(input: UploadFileInput) {
const { filename, mimetype, createReadStream } = await input.file
const newFilename = randomUUID() + '.' + (filename.split('.').pop() || '') // 확장자
const { mimetype, createReadStream } = await input.file
const newFilename = randomUUID()

if (!mimetype.includes('image/')) {
throw new UnprocessableDataException('Only image files can be accepted')
Expand Down

0 comments on commit af56564

Please sign in to comment.