Who this is for. Developers moving or restoring a site, and anyone who meets a template that is in neither the repository nor the framework. After this page you know where uploads are stored and what a migration must carry.
What a virtual file is
Every revision of a file or image keeps its bytes in a virtual file. It is the storage under every upload, not an optional feature: the ordinary upload path creates one for each revision, and there is no admin screen for them. A virtual file records the content's checksum (MD5), its type, its size and its virtual filename.
Where the bytes are
- In the database, when the content is 10 KB (10,240 bytes) or less.
- On disk, always. Every virtual file, whatever its size, is also written to the account's virtual-files store, a folder per account that lives outside the site's folder and is linked into the site as
.virtual-files. Deleting a virtual file deletes its copy on disk too.
So the bytes of a file over 10 KB exist only in the store on disk; its database row holds the checksum, type and size but not the content. A platform worker removes virtual files that nothing uses any more.
Why virtual files resolve last as templates
Smarty and Twig both look for a template in three places, in this order: the site's templates/, the framework's templates/, then the virtual-files store. A template path that exists in the repository or the framework is always found there first. A stored file is used as a template only when nothing earlier has that relative path.
The order is deliberate. The repository and the framework are what a release controls, so they win; the store is a fallback that sites rarely use on purpose. When a template renders that is in neither the repository nor the framework, it came from the store.
The more common use is to read a stored file's content directly, without treating it as a template: