Skip to content

Commit e113b8c

Browse files
committed
🐛 fix(recording): #9 resolve temp file creation issue
1 parent ae806f7 commit e113b8c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

recording/recording_handler.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ func SyncSttRecordingHandler(c *gin.Context) {
7878

7979

8080
// save with original file extension
81+
err = os.MkdirAll("tmp", os.ModePerm)
82+
if err != nil {
83+
c.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to create temp directory"})
84+
return
85+
}
86+
8187
ext := filepath.Ext(fileHeader.Filename)
8288
originalPath := fmt.Sprintf("tmp/%d%s", time.Now().Unix(), ext)
8389

0 commit comments

Comments
 (0)