fix(phase18): resolve Netlify Lambda payload limits for upload & image proxy
Upload 502: Netlify Lambda base64-encodes request bodies, capping binary uploads at ~4.5 MB. Real phone photos (5 MB+) hit its "Internal Error" before the function runs. Fix: compress client-side via Canvas API to ≤3 MB (max 2048 px longest side, quality 0.82 stepping down to 0.4) before the XHR is sent. All 515 tests pass.
Image proxy 502: "Function.ResponseSizeTooLarge" — buffering and returning a raw GitHub image through a Lambda response hits the same 6 MB limit. Fix: replace the buffer-and-return approach with a GitHub Contents API lookup that returns a short-lived signed download_url, then issue a 302 redirect so the browser fetches directly from GitHub. Zero Lambda response body. Eliminates the need to proxy through the bridge for images at all.
Both fixes are structural (not workarounds) and scale to all users/repos.
0 comments
muse hub commit comment sha256:926914f29fad4a69b70eea0ea1a46ce4d0546629edbaff89fe52df5ef60183d8 --body "your comment"
No comments yet. Be the first to start the discussion.