Linked data file types
The files that can be linked to objects, per family with its icon colour, its extensions, how they are stored and whether they open in the browser, and the extensions that are never accepted.
A file linked to an object as linked data is accepted by its extension, and its content has to be what the extension says: a ZIP archive named .pdf is refused. The extension puts the file in a family, which gives it its icon colour in the UI, decides how its bytes are stored, and whether it may be shown in the browser. The table is the default list; an instance can take extensions off it in its configuration (linked_data.extensions: [default, -dwg]). The extensions never accepted are refused on every instance, whatever the configuration says. A file may be up to 100 MiB by default (linked_data.max_file_bytes).
| Family | Extensions | Stored | Served |
|---|---|---|---|
| PDF# #C62828 | probed | inline | |
| Documents# #2B579A | .docx, .doc, .odt, .rtf, .pages | as is: .docx, .odt, .pages probed: .doc compressed: .rtf | attachment |
| Spreadsheets# #1E7145 | .xlsx, .xls, .ods, .csv, .tsv, .numbers | as is: .xlsx, .ods, .numbers probed: .xls compressed: .csv, .tsv | attachment: .xlsx, .xls, .ods, .numbers inline: .csv, .tsv |
| Presentations# #B7472A | .pptx, .ppt, .odp, .key | as is: .pptx, .odp, .key probed: .ppt | attachment |
| Images# #7B4FA8 | .jpg, .jpeg, .png, .gif, .webp, .heic, .heif, .tif, .tiff, .bmp, .svg | as is: .jpg, .jpeg, .png, .gif, .webp, .heic, .heif probed: .tif, .tiff compressed: .bmp, .svg | inline: .jpg, .jpeg, .png, .gif, .webp attachment: .heic, .heif, .tif, .tiff, .bmp, .svg |
| Video & audio# #AD1457 | .mp4, .mov, .webm, .m4v, .mp3, .m4a, .wav, .ogg | as is: .mp4, .mov, .webm, .m4v, .mp3, .m4a, .ogg probed: .wav | inline: .mp4, .webm, .mp3, .m4a, .wav, .ogg attachment: .mov, .m4v |
| Drawings & 3D# #00796B | .dwg, .dxf, .dgn, .step, .stp, .stl, .obj, .glb, .gltf, .3mf, .las, .laz, .e57 | probed: .dwg, .dgn, .stl, .glb, .las, .e57 compressed: .dxf, .step, .stp, .obj, .gltf as is: .3mf, .laz | attachment |
| BIM# #3949AB | .ifc, .ifczip, .ifcxml, .bcf, .bcfzip, .ids, .rvt, .rfa, .nwd, .nwc, .pln, .skp, .3dm | compressed: .ifc, .ifcxml, .ids as is: .ifczip, .bcf, .bcfzip probed: .rvt, .rfa, .nwd, .nwc, .pln, .skp, .3dm | attachment |
| GIS# #5B7A1E | .geojson, .kml, .kmz, .gml, .citygml, .gpkg, .shp.zip | compressed: .geojson, .kml, .gml, .citygml as is: .kmz, .shp.zip probed: .gpkg | attachment |
| Text & data# #546E7A | .txt, .md, .json, .xml, .yaml, .yml, .log | compressed | inline |
| E-mail# #9A6700 | .eml, .msg | compressed: .eml probed: .msg | attachment |
| Archives# #6D4C41 | .zip | as is | attachment |
Stored: compressed files are always stored with zstd; as is files are already compressed (JPEG, MP4, ZIP and the Office formats that are ZIP files) and stored as uploaded; for probed files the first 1 MiB is compressed as a trial, and the whole file only when the trial saves at least 10 % (linked_data.compression). Files under 4 KiB are never compressed. Either way a download is the file byte for byte as uploaded.
Served: an inline file may be shown in the browser (a PDF, a photo, a video, plain text); an attachment is always saved as a file. An SVG is never shown at its own address, because its scripts would run there.
Checks on the content#
The extension is not enough. The first bytes of a file must match its family (FILE_CONTENT_MISMATCH); a few CAD formats without a reliable signature are taken by their extension. A program is refused whatever its name (FILE_CONTENT_NOT_ALLOWED), and so is an Office file with macros (MACROS_NOT_ALLOWED). A ZIP archive is inspected without unpacking it: every file in it must be allowed, and it may not hold another archive, encrypted entries or far more than its own size (ARCHIVE_CONTENT_NOT_ALLOWED).
Never accepted#
Programs, scripts, installers, disk images, shortcuts, HTML (it would run its scripts in BIM.works) and the macro-enabled Office formats, whose macro-free siblings are allowed. Every part of a name is checked, so report.pdf.exe and report.exe.pdf are both refused (FILE_TYPE_NOT_ALLOWED). No configuration allows them.
.exe, .dll, .com, .scr, .pif, .cpl, .msi, .msp, .msix, .appx, .appxbundle, .sys, .drv, .ocx, .bat, .cmd, .ps1, .psm1, .psd1, .vbs, .vbe, .js, .jse, .mjs, .wsf, .wsh, .wsc, .sh, .bash, .zsh, .csh, .ksh, .command, .py, .pyc, .pyw, .rb, .pl, .php, .phtml, .asp, .aspx, .jsp, .cgi, .jar, .class, .war, .ear, .apk, .aab, .ipa, .dmg, .pkg, .app, .deb, .rpm, .snap, .appimage, .iso, .img, .vhd, .vhdx, .lnk, .url, .website, .scf, .inf, .reg, .hta, .chm, .gadget, .application, .xbap, .settingcontent-ms, .library-ms, .desktop, .html, .htm, .xhtml, .mht, .mhtml, .shtml, .svgz, .docm, .dotm, .xlsm, .xltm, .xlam, .xlsb, .pptm, .potm, .ppam, .ppsm, .sldm