Fix avatar upload path by adding a leading dot to the avatars directory

This commit is contained in:
Leon Bösche
2026-01-29 12:08:32 +01:00
parent 2f96d35657
commit ed86765321

View File

@@ -4038,7 +4038,7 @@ func uploadUserAvatarHandler(w http.ResponseWriter, r *http.Request, db *databas
// Upload to Nextcloud
client := storage.NewWebDAVClient(cfg)
avatarPath := fmt.Sprintf("avatars/%s", filename)
avatarPath := fmt.Sprintf(".avatars/%s", filename)
err = client.Upload(r.Context(), avatarPath, bytes.NewReader(fileBytes), header.Size)
if err != nil {
errors.LogError(r, err, "Failed to upload avatar")