CoolCMS API

Assets

Table of Contents

Namespaces

Processors

Interfaces

AssetFormatProcessor
Processes one format of an uploaded file: receives the bytes and the variant plan, writes files to disk and reports what was created.

Classes

AssetFormatRegistry
Single source of truth for which formats can be uploaded.
AssetProcessingContext
Input for {@see AssetFormatProcessor}: the raw bytes of one uploaded file plus where and in which variants to store them.
AssetProcessingResult
Output of {@see AssetFormatProcessor}: what the processor left on disk.
SvgSanitizer
Sanitizes SVG to a safe subset before the file reaches `www/`.
VariantRenderer
The single place where raster bytes are expanded into variants (resize and watermark) and where the on-disk file layout is known (`<absBase><variant>/<name>.<extension>`).

Enums

AssetFormatKind
Media kind served by a processor. Call sites (managers, uploaders) use it to say what they allow in a given context: an avatar or category icon takes `Raster` and `Vector`, a discussion attachment takes `Raster` and `Video`, but never `Vector` (SVG from an anonymous user is needless exposure, see {@see SvgSanitizer}).
On this page

Search results