Files
co-lite/openspec/changes/add-html-image-upload/specs/landing-pages/spec.md
T

1.1 KiB

ADDED Requirements

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