ChaiBuilder Logo

chaipro v0.3.1

Released 2026-08-04. Upgrading from v0.3.0.

The media uploads release. The media manager stops being images only, upload validation moves to the server, and two long standing hydration errors on rendered pages are gone.

Added

  • Video, document and audio uploads in the media manager. Alongside images, the media manager now accepts video (MP4, WebM, MOV), documents (PDF, DOCX, XLSX, PPTX, TXT, CSV) and audio (MP3, WAV, OGG), each with its own size cap rather than one flat limit for everything.
  • Configurable upload policy. The accepted categories and the per category size caps are options on the media backend. Setting an allowed list replaces the default set; setting size caps merges per category. One policy drives the server validator, the dropzone and the grid filter, so a category you disable disappears from the interface instead of failing at the end of an upload. See Storage Configuration.
  • A Video block, for embedding a self hosted MP4 on a page, with its own settings panel.
  • A page type label tooltip in the builder, explaining what a page type is and linking to Page Types.
  • A server side type filter in the media grid, so you can narrow the library to one kind of asset.

Security

  • Every upload is now validated on the server. The extension has to be on the whitelist, its category has to be enabled, the declared content type has to match the extension, and the file's leading bytes have to match the format the extension claims. Only the resolved content type is stored, never the one the browser declared, and the size cap is re-checked server side. The previously active upload path carried no content type whitelist at all and trusted whatever the client declared.
  • The admin side upload and the media manager share one policy. The admin collection used to hardcode every category, so an upload through the admin panel could put a file type into shared storage that the media manager itself would reject. Narrowing the allowed types now closes both doors at once.
  • An unknown extension fails closed. An extension with no declared byte signature cannot be verified, so it is rejected rather than passed through.

Changed

  • Uploads move from base64 inside JSON to multipart, which removes roughly a third of the bytes on the wire and the file reading round trip in the browser. Authorization, permissions and dispatch stay on the existing request path.
  • Non image assets render a type icon in the media grid instead of a broken media element, and the detail view previews them without downloading the whole file.
  • The side panel tab strip lays out responsively, so tab labels stop being clipped in a narrow panel.
  • The Tailwind stylesheets shipped inside the package are generated at build time, with a global stylesheet reference used to deduplicate what each page emits. This is internal packaging work with no configuration to change.

Fixed

  • Hydration error on pages showing the preview banner. The banner was loaded as a client only component, which put a scaffold in the browser tree that the server HTML did not contain and failed hydration for the whole page. It is server rendered now, and renders nothing when the banner is off.
  • Hydration error on pages using animations. Animations now run through the browser's animation API instead of mutating classes and inline styles on markup that React is still hydrating. This was the cause of the animation related hydration mismatch reported on rendered pages, including pages that stream.
  • Published builds reported the wrong version to license validation. The release process built the package before stamping the version, so every published bundle told the license endpoint it was version 0.1.0 while the package manifest carried the real version. Builds now report the version they were published as.
  • The asset detail view no longer waits forever on a non image asset, which used to leave a permanent loading state.
  • Stock photo imports and AI generated images derive their extension and content type from the actual file rather than assuming WebP, so both keep working under the stricter validation.

Upgrade notes

  • If you restrict uploads, review the allowed categories and size caps on your media backend. The defaults now include video, documents and audio, so an unconfigured install accepts more kinds of files than it did on v0.3.0.
  • If you upload through the admin panel with a narrowed media manager policy, the admin path now honours that same policy.

© ChaiBuilder. All rights reserved.