Skip to content

Commit

Permalink
mp3_allowing_eleminated
Browse files Browse the repository at this point in the history
  • Loading branch information
golanguzb71 committed Oct 14, 2024
1 parent 280eb13 commit ce38e71
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions api-gateway/internal/handlers/ielts_exam_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func CreateOutlineAttemptSpeaking(ctx *gin.Context) {
return
}
ext := strings.ToLower(filepath.Ext(file.Filename))
if ext != "mp3" {
if ext != ".mp3" {
utils.RespondError(ctx, http.StatusBadRequest, "Only MP3 files are allowed")
return
}
Expand All @@ -189,12 +189,6 @@ func CreateOutlineAttemptSpeaking(ctx *gin.Context) {
return
}

mimeType := http.DetectContentType(buffer)
if mimeType != "audio/mpeg" {
utils.RespondError(ctx, http.StatusBadRequest, "Only MP3 files are accepted")
return
}

fileContent.Seek(0, 0)

strPartNumber := ctx.Query("partNumber")
Expand Down

0 comments on commit ce38e71

Please sign in to comment.