You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixed
upload_file base64 now tolerates dirty input instead of failing with kie's opaque atob error (#62). kie's uploader rejects any non-conformant base64 with a confusing doubled "Base64 decoding failed: … atob() … invalid base64-encoded data" message. A new normalizeBase64 step runs before the upload: strips a data:<mime>;base64, prefix, removes whitespace/newlines (encoders wrap at 76 cols; the MCP transport can insert them — the most likely real cause), and maps base64url (-/_) to standard. If the payload is still invalid it returns an actionable client-side error ("length N not a multiple of 4 — likely truncated in transit; re-send or use file_url") instead of passing corrupt data to kie. Verified live: clean and newline-wrapped JPEGs upload; a truncated payload returns the clear error.
Tool schema note added: very large images can be truncated when passed as a tool argument — prefer file_url with a public URL for those.