Fix file permissions on image upload
Some checks failed
Deploy with Docker Compose / deploy (push) Has been cancelled

This commit is contained in:
2026-03-09 16:23:44 +00:00
parent 99ddd7d494
commit 1e3c6adf5e

View File

@@ -71,6 +71,10 @@ func (store *Store) UploadMessageFile(ctx *gin.Context) {
ctx.JSON(http.StatusInternalServerError, gin.H{"error": "failed to save file"})
return
}
if err := os.Chmod(dest, 0644); err != nil {
ctx.JSON(http.StatusInternalServerError, gin.H{"error": "failed to set file permissions"})
return
}
ctx.JSON(http.StatusOK, gin.H{"url": "/uploads/" + filename})
}