<bucket>.files,
content in chunks in <bucket>.chunks. Slash-separated file names become
folders.
Setup
Get a MongoDB connection URI as for the MongoDB VFS, for a user withreadWrite on the database that holds the bucket (read for
a read mount). In Atlas, the built-in Read and write to any database
role also works. Then export it:
pip install "mirage-ai[gridfs]"; Node needs the mongodb peer
dependency (pnpm add @struktoai/mirage-node mongodb).
Connect
- YAML
- Python
- TypeScript
workspace.yaml
Layout
- The bucket is
fsunlessbucketnames another;key_prefixscopes the mount to the files under that prefix. - A write adds a revision and the newest one is read.
rmmoves every revision to a trash no mount path reaches;keep_revisionsbounds how many are kept. mkdirstores a zero-bytedata/marker so an empty folder stays visible.
Sample runs
write mount; mv renames every
revision on the server.
SDK guides
Python
Every config field, the VFS.md and write support.
TypeScript
Every config field, the VFS.md and write support.