{
"id": "dev.atfs.repo.getFile",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "BlobNotFound",
"description": "No file is stored under this cid, or — when did is supplied — that account holds no claim on it; the two are reported identically, matching com.atproto.sync.getBlob's own behavior."
}
],
"output": {
"encoding": "*/*"
},
"parameters": {
"type": "params",
"required": [
"cid"
],
"properties": {
"cid": {
"type": "string",
"format": "cid",
"description": "The blessed CID (see dev.atfs.file) of the file to fetch."
},
"did": {
"type": "string",
"format": "did",
"description": "Restrict the fetch to a file this account holds a claim on (pin-set membership — not necessarily the account that uploaded it). Optional here — unlike on the com.atproto.sync.getBlob alias, where it's required to stay PDS-compatible — since atfs content is addressed by cid alone, so omitting did simply serves any file with that cid."
}
}
},
"description": "Fetch a file previously uploaded to this atfs instance. Compatible with com.atproto.sync.getBlob — also mounted, unmodified, under that name, for callers that have no reason to know atfs has its own name for it — with one deliberate difference: did is optional here. Requiring a did the way a PDS does is a repo-scoping artifact (a PDS's blobs live inside a specific account's repo); atfs content is content-addressed by cid alone, and the /ipfs/<cid> gateway path already serves it that way, so a did-less getFile exposes nothing a full IPFS client couldn't already reach. When did is supplied, the file is served only if that account holds a claim on it — pin-set membership (see dev.atfs.repo.deleteFile), which any claimant satisfies whether or not it was the one that originally uploaded the file — a mismatch is reported identically to a missing file — matching com.atproto.sync.getBlob's own scoping exactly; the com.atproto.sync.getBlob alias always requires it, to stay PDS-compatible. Does not require auth, on either name."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}