Merge pull request 'docs: archive add-html-image-upload' (#75) from archive-html-image-upload into main
CI / build-and-publish (push) Failing after 0s

This commit was merged in pull request #75.
This commit is contained in:
ngqile committed 2026-12-04 02:10:43 +00:00
commit a7129b417e
6 files changed
+22

No files matched your search

+22
View File
@@ -673,3 +673,25 @@ A HERO block with an event MAY carry a form heading of at most 80 characters and
- **WHEN** staff save a HERO block with a form heading and no event
- **THEN** the save is refused at `blocks[n].formHeading`
### Requirement: Image Upload For Custom HTML
A Custom HTML block's panel in the editor SHALL offer an image upload for the page's company, under the same checks as other page images. On success it SHALL show the image's preview and its public link with a copy button; on refusal it SHALL show the reason. The upload SHALL NOT change the block's HTML.
#### Scenario: Upload an image for the HTML
- **GIVEN** staff editing an INS page with a Custom HTML block
- **WHEN** they choose `lobby.webp` under "Upload image" in that block's panel
- **THEN** the image is stored for INS and the panel shows its preview and the link `/api/public/page-images/<id>`
- **AND** "Copy link" copies that link, and the block's HTML is unchanged
#### Scenario: Refused upload
- **WHEN** staff choose a 3 MB JPEG under "Upload image"
- **THEN** the panel shows that the image is too large, and no link appears
#### Scenario: New page without a company
- **GIVEN** a super admin's new page with no company chosen
- **WHEN** they choose a file under "Upload image"
- **THEN** nothing is uploaded and the panel asks them to choose a company