Docly Developers
DocsUpdated 24 Oct 2026

Uploaded file

The Uploaded File schema represents a file Docly stores as it was uploaded — PDFs, ZIP archives, fonts, Office documents and anything else binary. The file itself lies on disk as an embedded file; the document holds its name, a description and tags. It is the catch-all schema a file gets when no other schema claims its extension.

The schema

Field

Type

Notes

File

Embedded file

The file. Its content is stored on disk, not in the document's values; the field holds the embedded file id.

Filename

Text

The file name, shown as the heading in the editor.

Description

Text

Optional. Indexed for search (weight 10).

Tags

Document tags

The tag field in the form. See Tags are stored as search words.

Schema name Uploaded File, mapped extension * (any). It is a platform schema: it ships with the Docly deployment, so it exists on every installation whether or not a package provides it. The File storage package carries the same schema, so that users without developer access can upload files too.

Which files become an Uploaded File

Docly picks the schema from the file's extension and content when it is written. The rule is the same for every route in:

File

Becomes

An extension another enabled schema maps (.jpg → Uploaded Image, .url → Internet Shortcut, .js/.css/.hash … → Code File)

That schema

.json with valid JSON

A schemaless JSON document (developers)

Any other extension, binary content

Uploaded File

Any other extension, text content, written by a developer

Code File, so it stays editable

A text or code file larger than 2 MB

Uploaded File — a Code File keeps its text in the database and is capped there

Developers always get the platform schemas. A user without developer access can only upload where the folder accepts the schema — through the File storage package or the folder's list of accepted content. Otherwise the upload is refused with Schema 'Uploaded File' is not an enabled template in this folder! or Can't find any file mapping for extension '…' in this application!.

Create one

  • Upload in the Docly editor: drag files (or whole folders) onto a folder.

  • docly CLI: docly put "<folder path>/brochure.pdf" brochure.pdf --create, or docly push from a working copy. If new content changes the type (a Code File that becomes binary), the document is replaced and gets a new id — put prints it, push refuses unless you pass --allow-replace.

These routes accept files up to about 4 GB. A file a visitor posts to your own #/API/ script is limited to 30 MB — see Request bodies are limited to 30 MB.

Serving and linking

On a published site the document is served at its own path, byte for byte, with a Content-Type from its extension: files/brochure.pdf in the site folder is https://example.com/files/brochure.pdf, and a file in #/Root/ is served from the site root (see The Root folder).

<a href="/files/brochure.pdf">Brochure (PDF)</a>

<!-- Or let Docly build the link, with the name the browser saves it as -->
#let f = docly.getFile("files/brochure.pdf")#
<a href="#docly.linkFile(f, f.File, 'product-brochure-2026.pdf')#" download>Download the brochure</a>

Limits and behaviour

  • Cached for a year. Static files are served with a one-year max-age. Replace a file under the same name and returning visitors can keep the old copy — give the new file a new name, or link it through assetUrl() (Cache-busting bundles with assetUrl).

  • Not searched by content. Content search (docly find --contains and similar) skips Uploaded File and Uploaded Image: the bytes are on disk and there is no text to match. The file name, tags and Description are searchable.

  • Folder previews. Docly shows the file itself as the thumbnail for types it can render, PDF included — see Preview image in folder lists.