File
File metadata with FileType and MediaType enums — including webp and floorplan
Validate File objects at runtime with FileSchema from @eventconnectors/ndtrc_model.
The File object represents an attached media asset on a TRCItem — images, videos, PDFs, audio files, or geo data. Each file has a filetype (the wire format) and a mediatype (the semantic role).
Example
{
"trcid": "f_abc123",
"main": true,
"filename": "museum-exterior.jpg",
"hlink": "https://cdn.example.com/images/museum-exterior.jpg",
"filetype": "jpg",
"mediatype": "photo",
"copyright": "© Rijksmuseum"
}Fields
| Field | Type | Description |
|---|---|---|
trcid | string | File identifier |
main | boolean | Primary file for this item |
filename | string | Original filename (or video ID for YouTube/Vimeo) |
hlink | string | URL to the file |
filetype | string | File format (see FileType below) |
mediatype | string | Semantic role (see MediaType below) |
copyright | string | Copyright notice |
targetLanguage | string | Language of the content |
title | object | Title with translations |
FileType
The underlying file format:
| Value | Category | Notes |
|---|---|---|
jpeg | Image | |
jpg | Image | |
png | Image | |
gif | Image | |
bmp | Image | |
tif | Image | |
tiff | Image | |
jfif | Image | |
webp | Image | Recently added |
mp3 | Audio | |
pdf | Document | |
gpx | Geo data | GPS track |
kml | Geo data | Keyhole Markup |
kmz | Geo data | Compressed KML |
youtube | Video | filename holds the video ID; hlink is the canonical YouTube URL |
vimeo | Video | filename holds the video ID |
When mediatype is omitted, the API derives it from filetype automatically: image types become photo, youtube/vimeo become video.
MediaType
The semantic role of the file:
| Value | Meaning |
|---|---|
photo | Photographic image (most common) |
video | Video content |
audio | Audio recording |
poster | Promotional poster artwork |
logo | Brand or organisation logo |
brochure | Multi-page promotional document |
floorplan | Floor plan or layout diagram — recently added |
roadmap | Route or area map |
text | Plain-text content |
attachment | Generic attachment |
qr | QR code image |
other | Catch-all |
The webp file type and floorplan media type are recent additions to the model.
Image Specifications
When providing images via a feed or the API, use these guidelines for best results across publishing channels:
| Requirement | Value |
|---|---|
| Minimum dimensions | 1800 × 1020 px |
| Orientation | Landscape (wider than tall) |
| Recommended file size | 7–10 MB |
| File name | No spaces or special characters (e.g., avoid %) |
Higher-resolution images are preferred because content may be displayed on large screens (TV, digital signage). The system does not resize on ingest, so provide the highest quality your source supports.
The 7–10 MB above is a quality guideline, not the hard limit. Direct uploads via POST /api/assets are capped by the server's configured maximum (uploads over the cap return 413) and restricted to an allowed set of MIME types (others return 415) — images, documents (PDF, Word, Excel, CSV, TXT), and geographic files (GPX, KML, KMZ).
Serving images
Image references in API responses point to the Event Connectors asset server (for example https://app.eventconnectors.nl/api/assets/{id}/{filename}). We recommend downloading those images and serving them from your own server or CDN, rather than linking the asset-server URL directly in your pages. Self-hosting keeps your site working if the asset server is briefly unavailable or an asset URL changes, gives you control over caching and delivery, and avoids putting page-render traffic on our asset server. The endpoint supports on-the-fly resizing via the w, h, and mode query parameters, so you can fetch an appropriately sized variant before storing it. See the Sync Events to Your Own Database recipe for how this fits into a sync.
See the API Reference for the full File schema.