[BUG] Object storage upload keys use backslashes on Windows
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
Research direction
Start in backend/modules/foundation/domain/file/service and run the provided Windows-focused Go test command for TestFileServiceImpl_UploadLoopFile and TestFileServiceImpl_UploadFileForServer. Trace how those methods construct object-storage keys, then verify the tests pass with platform-independent forward-slash keys, including the prefix-only space/ expectation.
Written by the indexing model from the issue text.
Description
📋 CheckList
- I have searched existing issues to avoid duplicates
- I am using a recently maintained version of Coze Loop
- I have provided all required information
- I understand this is a bug report and not a feature request
- I have submitted this report in English (otherwise it will not be processed)
🐛 Bug Description
UploadLoopFile and UploadFileForServer construct object-storage keys with filepath.Join. On Windows, this produces backslash-separated keys, even though object-storage keys and the existing test contract use forward slashes.
🔄 Steps to Reproduce
- Check out current
mainon Windows. - Run:
cd backend
go test -count=1 -run 'TestFileServiceImpl_Upload(LoopFile|FileForServer)$' -v ./modules/foundation/domain/file/service
- Observe failures in both upload methods because generated keys contain backslashes.
✅ Expected Behavior
Object-storage keys are platform-independent, for example 1234567890/testfile.txt and workspace/custom.txt.
❌ Actual Behavior
On Windows, the keys are generated as 1234567890\testfile.txt and workspace\custom.txt. Prefix-only uploads similarly fail the existing space/ expectation.
🚨 Severity
Medium - Minor functionality affected
🔧 Component
Infrastructure
💻 Environment
- OS: Windows 11
- Go: go1.26.3 windows/amd64
- Coze Loop:
a2c804de6f95a209a1bd6cb6489c5a76221abd20(currentmainwhen reproduced)
🔧 Go Environment
Relevant values: GOOS=windows, GOARCH=amd64, GOVERSION=go1.26.3.
📋 Logs
expected: "1234567890/testfile.txt"
actual : "1234567890\\testfile.txt"
expected: "workspace/custom.txt"
actual : "workspace\\custom.txt"
📝 Additional Context
The storage-key path should use the slash-oriented path package rather than the OS-filesystem-oriented path/filepath package. The existing tests already encode the expected portable key format.
- Dominant language
- Go
- Stars
- 5.7k
- Forks
- 795
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 29
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from coze-dev/coze-loop
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
Google Wire Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
扣子sdk能不能跟官方文档同步更新 Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in coze-dev/coze-loop
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·