Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(upload): remove unnecessary uploads/ key prefix

yushen978a5af5de94
diff --git a/server/internal/handler/file.go b/server/internal/handler/file.go
index 096e9a13de..230c0336d5 100644
--- a/server/internal/handler/file.go
+++ b/server/internal/handler/file.go
@@ -89,7 +89,7 @@ func (h *Handler) UploadFile(w http.ResponseWriter, r *http.Request) {
writeError(w, http.StatusInternalServerError, "internal error")
return
}
- key := "uploads/" + hex.EncodeToString(b) + path.Ext(header.Filename)
+ key := hex.EncodeToString(b) + path.Ext(header.Filename)
link, err := h.Storage.Upload(r.Context(), key, data, contentType, header.Filename)
if err != nil {