change file permissions to /uploads
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 4m0s

This commit is contained in:
2026-03-09 13:59:59 +00:00
parent 0a8a752433
commit 85a2325683
2 changed files with 7 additions and 1 deletions

View File

@@ -48,6 +48,11 @@ func (store *Store) UploadMessageFile(ctx *gin.Context) {
ctx.JSON(http.StatusInternalServerError, gin.H{"error": "failed to create upload directory"})
return
}
// Ensure directory is world-readable so nginx can serve files
if err := os.Chmod(uploadDir, 0755); err != nil {
ctx.JSON(http.StatusInternalServerError, gin.H{"error": "failed to create upload directory"})
return
}
dest := filepath.Join(uploadDir, filename)
if err := ctx.SaveUploadedFile(file, dest); err != nil {