Skip to content

fix(skills): avoid false invalid ZIP uploads#893

Open
raihan0824 wants to merge 1 commit intonextlevelbuilder:mainfrom
raihan0824:fix/skills-upload-invalid-zip-862
Open

fix(skills): avoid false invalid ZIP uploads#893
raihan0824 wants to merge 1 commit intonextlevelbuilder:mainfrom
raihan0824:fix/skills-upload-invalid-zip-862

Conversation

@raihan0824
Copy link
Copy Markdown

Summary

Fix skill ZIP uploads that were being rejected with a misleading Invalid ZIP file error even when the archive was valid.

Changes

  • treat browser-side JSZip parsing as best-effort and fall back to direct upload when local inspection reports upload.invalidZip
  • keep real client-side validation errors blocking
  • flush and close the uploaded temp file before reopening it with zip.OpenReader on the backend
  • add regression tests for the frontend fallback path

Verification

  • pnpm test src/pages/skills/lib/validate-skill-zip.test.ts src/pages/skills/lib/resolve-upload-skills.test.ts
  • go test github.com/nextlevelbuilder/goclaw/internal/http -run TestHandleUpload

Closes #862.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant