Files and assets
The website file library stores uploads in directories and serves them from a CDN. Three upload paths cover small files, large files, and existing URLs.
The library
Files belong to a website and optionally to a directory. Each file has an original name, a mime type, a size, and a public CDN URL. Deletes are soft, so a deleted file stops resolving without losing the record.
Uploading
Pick the path that fits the file:
- Small files — post
multipart/form-datato the files endpoint. - Large files —
create_upload_urlreturns a 15-minute presignedPUTfor up to 5 GB. Send the returned headers, upload the bytes, then callcomplete_upload. The server verifies size and content type before it inserts the row. - Existing URLs —
import-urlfetches a public HTTPS image, resizes it, and stores a WebP;from-urlpulls a file that already lives on the site CDN.
Directories
Directories nest and can be renamed or moved. Delete removes nested subdirectories in one step, but only when no file remains anywhere in that folder tree — move or delete those files first.
SVG
stamp_svg fetches a CDN SVG and returns markup with a data-svg-canvas-id, which is what the SVG canvas block and inline image props expect.