{"id":"6a4aea2827373c77e4cb35e3","title":"2026 07 06","path":"how-to/committee/release-notes/2026-07-06","contentMarkdown":"# 06-Jul-2026 — Pasting an image into content saves reliably again\n\n## [build 747](https://github.com/nbarrett/ngx-ramblers/actions/runs/28758523783) — [commit 0bc3987](https://github.com/nbarrett/ngx-ramblers/commit/0bc39872e750629fd6cfa13d6ee4a03694f9d0ad)\n\n_____\n\nPasting an image into the cropper and saving produced a 500 that\nreturned an HTML error page, which the upload response handler then\ntried to JSON.parse (\"Unexpected token '<'\"), crashing the editor.\n\nRoot cause: a pasted image arrives as a base64 data URL that becomes\nthe column imageSource / preloadImage. The cropper built the upload\nFile with its name set to that entire data URL, so the multipart part\nheader was ~870KB and multer/busboy rejected it, yielding Express's\ndefault 500 HTML page.\n\n- file-utils: applyBase64ToFile now routes the requested name through\na new safeUploadFileName, which falls back to a generated\npasted-content filename when the name is a data URL or over 255\nchars. Covers both croppedFile paths (imageCropped and the\nnon-croppable auto-generate), so any paste gets a real filename.\n- file-upload.service: validateAndParse no longer throws on a\nnon-JSON response; it shows a clear upload error instead of an\nuncaught SyntaxError.\n- aws-routes: the file-upload route wraps multer so a parse/limit\nerror returns a JSON 400 instead of a 500 HTML page.","contentHtml":"<h1>06-Jul-2026 — Pasting an image into content saves reliably again</h1>\n<h2><a href=\"https://github.com/nbarrett/ngx-ramblers/actions/runs/28758523783\">build 747</a> — <a href=\"https://github.com/nbarrett/ngx-ramblers/commit/0bc39872e750629fd6cfa13d6ee4a03694f9d0ad\">commit 0bc3987</a></h2>\n<hr>\n<p>Pasting an image into the cropper and saving produced a 500 that\nreturned an HTML error page, which the upload response handler then\ntried to JSON.parse (&quot;Unexpected token &#39;&lt;&#39;&quot;), crashing the editor.</p>\n<p>Root cause: a pasted image arrives as a base64 data URL that becomes\nthe column imageSource / preloadImage. The cropper built the upload\nFile with its name set to that entire data URL, so the multipart part\nheader was ~870KB and multer/busboy rejected it, yielding Express&#39;s\ndefault 500 HTML page.</p>\n<ul>\n<li>file-utils: applyBase64ToFile now routes the requested name through\na new safeUploadFileName, which falls back to a generated\npasted-content filename when the name is a data URL or over 255\nchars. Covers both croppedFile paths (imageCropped and the\nnon-croppable auto-generate), so any paste gets a real filename.</li>\n<li>file-upload.service: validateAndParse no longer throws on a\nnon-JSON response; it shows a clear upload error instead of an\nuncaught SyntaxError.</li>\n<li>aws-routes: the file-upload route wraps multer so a parse/limit\nerror returns a JSON 400 instead of a 500 HTML page.</li>\n</ul>\n"}