This PR implements the OpenSpec change add-html-image-upload.
A Custom HTML block's panel now has an Upload image picker. The image uploads straight away for the page's company, through the existing POST /api/pages/images and with the same type and size checks as other page images. The panel then shows each upload with:
a preview;
its link /api/public/page-images/<id>;
a copy button.
What it does not do
It never changes the block's HTML.
It needs no change on the server.
Errors
A refused file shows the reason under the picker.
On a new page where a super admin has not chosen a company yet, it asks them to choose one first.
Checks
The new editor tests failed first and pass now.
vitest: 1997 passed, exit code 0.
tsc is clean, and lint has 0 errors.
openspec validate --strict passes.
I checked it live on port 3001:
uploaded an image on Hotel technology and saw its link and preview;
a text file named .png was refused;
the page was not saved.
Labels: the English and Chinese labels are added, plus a SQL file for them in the change folder.
This PR implements the OpenSpec change `add-html-image-upload`.
A Custom HTML block's panel now has an **Upload image** picker. The image uploads straight away for the page's company, through the existing `POST /api/pages/images` and with the same type and size checks as other page images. The panel then shows each upload with:
- a preview;
- its link `/api/public/page-images/<id>`;
- a copy button.
**What it does not do**
- It never changes the block's HTML.
- It needs no change on the server.
**Errors**
- A refused file shows the reason under the picker.
- On a new page where a super admin has not chosen a company yet, it asks them to choose one first.
**Checks**
- The new editor tests failed first and pass now.
- vitest: 1997 passed, exit code 0.
- tsc is clean, and lint has 0 errors.
- `openspec validate --strict` passes.
- I checked it live on port 3001:
- uploaded an image on Hotel technology and saw its link and preview;
- a text file named `.png` was refused;
- the page was not saved.
Labels: the English and Chinese labels are added, plus a SQL file for them in the change folder.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR implements the OpenSpec change
add-html-image-upload.A Custom HTML block's panel now has an Upload image picker. The image uploads straight away for the page's company, through the existing
POST /api/pages/imagesand with the same type and size checks as other page images. The panel then shows each upload with:/api/public/page-images/<id>;What it does not do
Errors
Checks
openspec validate --strictpasses..pngwas refused;Labels: the English and Chinese labels are added, plus a SQL file for them in the change folder.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EFUzfiCVCgCVJZq4NDEqZs