Frontend: hardcoded /api/v1 paths bypass ZAMPP_API.fetch in upload module #115
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixed in
04ce096.window.ZAMPP_API_PREFIXexposes/api/v1fromdata.jsx. Upload XHRs (/part,/simple), SDK upload XHR, and thumbnail fetch invisuals.jsxall use it instead of hardcoding the prefix.zgaetano referenced this issue2026-05-26 18:22:49 -04:00
Fix Plan — #115 Hardcoded /api/v1 paths in upload module
Root cause:
screens-ingest.jsx:36,56—_xhrPostuses literal/api/v1/upload/simpleand/api/v1/upload/part. If API prefix changes, uploads silently break. BypassesZAMPP_API.fetch.Fix — share API_BASE constant:
Alternatively, expose
ZAMPP_API.xhrPost()helper that wrapsfetchwith the correct base + error handling.Files:
screens-ingest.jsx:36,56,data.jsxEffort: ~30min
**Priority: P2 — maintainability