fix tmp folder creation

This commit is contained in:
2026-04-14 19:52:44 +02:00
parent 1566ccf348
commit 9aeb7faa15
2 changed files with 8 additions and 3 deletions

View File

@@ -30,6 +30,7 @@ RUN mkdir -p /app/uploads
RUN mkdir -p /app/tmp
RUN adduser -D appuser
RUN chown -R appuser:appuser /app
USER appuser
ENV GIN_MODE=release

View File

@@ -41,10 +41,14 @@ func main() {
// create temp folder
path := "./tmp"
if os.IsExist(os.Mkdir(path, os.ModePerm)) {
fmt.Printf("Temp folder already exists, skipping creation\n")
} else {
if err := os.MkdirAll(path, os.ModePerm); err != nil {
fmt.Printf("Error creating temp folder: %v\n", err)
return
}
}
r := gin.Default()