dev.atfs.file
Schema Diff
+2 -1
Compatibility Analysis
Backward Compatible
No changes detected.
1
1
{
2
2
"id": "dev.atfs.file",
3
3
"defs": {
4
4
"main": {
5
5
"type": "object",
6
6
"required": [
7
7
"cid",
8
8
"ipfsRoot",
9
9
"size",
10
10
"mimeType"
11
11
],
12
12
"properties": {
13
13
"cid": {
14
14
"type": "cid-link",
15
15
"description": "The blessed CID of the file's bytes (CIDv1, raw multicodec, sha-256 multihash) — the canonical identity. This is what dev.atfs.repo.uploadFile (and its com.atproto.repo.uploadBlob alias) returns, what equality/dedup use, what atfs's own HTTP surfaces serve at any size, and the only DASL-compatible form. Never a DAG root."
16
16
},
17
17
"size": {
18
18
"type": "integer",
19
19
"description": "Size of the file, in bytes."
20
20
},
21
21
"ipfsRoot": {
22
22
"type": "cid-link",
23
23
"description": "The CID to fetch this file over the IPFS network: the UnixFS root for chunked (large) files, or exactly equal to `cid` when the file fits a single block. Always present, even when equal to `cid`, so consumers never need conditional logic — fetch `ipfsRoot`, then verify the bytes against `cid`. Chunker-dependent: this is *a* valid way to fetch the bytes, not a second identity — re-adding the same bytes elsewhere with different chunk settings would yield a different, equally valid root."
24
24
},
25
25
"mimeType": {
26
26
"type": "string",
27
27
"description": "The IANA media type of the file's bytes, exactly as recorded at upload time (see dev.atfs.repo.uploadFile). Defaults to application/octet-stream when the uploader supplied no Content-Type."
28
28
},
29
29
"providers": {
30
30
"type": "array",
31
31
"items": {
32
32
"type": "string",
33
33
"format": "uri"
34
34
},
35
+
"maxLength": 16,
35
36
"minLength": 1,
36
-
"description": "Advisory HTTPS origins (not full URLs — each is expected to answer both /ipfs/<cid> and a dev.atfs.repo.getFile-style XRPC, with the rest supplied by the author's DID), ordered by preference with the uploader's own instance first. Never required for correctness: a full IPFS client can always fall back to DHT routing."
37
+
"description": "Advisory HTTPS origins (not full URLs — each is expected to answer both /ipfs/<cid> and a dev.atfs.repo.getFile-style XRPC, with the rest supplied by the author's DID), ordered by preference with the uploader's own instance first. Never required for correctness: a full IPFS client can always fall back to DHT routing. HTTPS is meant literally — an atfs instance asked to pin this file skips any origin naming another scheme, and any origin resolving to an address that isn't routable on the public internet, since a providers list is a stranger's instruction about where to make connections."
37
38
}
38
39
}
39
40
}
40
41
},
41
42
"$type": "com.atproto.lexicon.schema",
42
43
"lexicon": 1,
43
44
"description": "An embeddable reference to a file hosted on an atfs instance and addressed by IPFS content-addressing. Deliberately not the native `blob` lexicon type: a PDS scans records for blob refs and rejects any whose blob isn't in its own blob store, which an atfs-hosted file structurally isn't. Embed this object in place of a blob field instead; field names (mimeType, size) are kept identical to blob refs for familiarity."
44
45
}