{
"id": "dev.atfs.repo.uploadFile",
"defs": {
"main": {
"type": "procedure",
"input": {
"encoding": "*/*"
},
"errors": [
{
"name": "BlobTooLarge",
"description": "The request body exceeds this instance's maximum blob size."
}
],
"output": {
"schema": {
"type": "object",
"required": [
"blob"
],
"properties": {
"blob": {
"type": "blob",
"description": "The PDS's own uploadBlob response shape: the uploaded bytes' blessed CID (see dev.atfs.file's cid field), the mimeType recorded (defaulting to application/octet-stream when the request carried no Content-Type), and size in bytes."
},
"ipfsRoot": {
"type": "cid-link",
"description": "atfs's own addition to the PDS response shape, absent from a plain com.atproto.repo.uploadBlob response: the CID to fetch the just-uploaded file over the IPFS network, exactly as dev.atfs.file's ipfsRoot field documents — the UnixFS root for a large file, or equal to blob's own CID when it fits a single Bitswap block. Standard atproto clients ignore unknown top-level fields, so this stays response-compatible with the PDS. Omitted (not a misleading zero value) on the rare occasion indexing hasn't finished yet; the file is already safely stored either way, and a later dev.atfs.repo.getFile or /ipfs/<cid> request is unaffected."
}
}
},
"encoding": "application/json"
},
"description": "Upload a file to be served by this atfs instance over IPFS and plain HTTP. Intentionally fully wire-compatible with com.atproto.repo.uploadBlob — same binary request body, same inter-service auth mechanism, same response shape — so any uploadBlob client works against this endpoint unchanged, by switching only the NSID in the request path and the `lxm` claim of its auth token. This method is also mounted, unmodified, as com.atproto.repo.uploadBlob itself, for callers that have no reason to know atfs has its own name for it; a token minted for one NSID is rejected on the other's path. Requires auth (a caller's own inter-service auth JWT, signed by its account's signing key); restricted to the instance's configured account allowlist (see dev.atfs.server's accounts field)."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}