PotDrive
Open Drive

Reference

Gateway API

An IPFS-style HTTP gateway over Portaldot. Every byte it returns has been checked against its CID.

Routes

GET /ipfs/<cid>A file, verified. Raw leaves and UnixFS files.
GET /ipfs/<cid>/A directory: index.html if present, otherwise a listing.
GET /ipfs/<cid>/<path>A file inside a directory, resolved one verified block per segment.
?download=<name>Adds Content-Disposition: attachment.
?name=<name>Picks the Content-Type from the extension.
GET /api/file/<cid>JSON: format, every block's (block, index, size), expiry and registry record.
GET /api/storedJSON: every TransactionStorage entry and the public registry records.
GET /api/proofsJSON: recent blocks' storage proofs and the next due block.

Range requests

The gateway reads the UnixFS root's blockSizes, works out which leaves overlap the requested range, and fetches only those. A video can seek to minute 40 without downloading minutes 1 to 39. Responses over 32 MiB are served in windows with 206 Partial Content. Browsers continue with further ranges on their own.

Terminal
$ curl -sI -H "Range: bytes=5000000-5000099" https://potdrive.anshverma.tech/ipfs/bafykbzace…
HTTP/2 206
content-range: bytes 5000000-5000099/16777216
accept-ranges: bytes
x-potdrive-verified: blake2b-256

Response headers

Content-TypeFrom ?name or the path extension, then the registry, then the first bytes. Sealed files are always application/octet-stream.
Content-Security-Policysandbox allow-scripts … for HTML, SVG and JS. See the sandbox.
Cache-Controlpublic, max-age=31536000, immutable. A CID never changes.
ETagThe CID. If-None-Match gives 304.
Access-Control-Allow-Origin*
X-Ipfs-PathThe resolved path, as IPFS gateways send it.

Status codes

400Not a CIDv1 with a blake2b-256 multihash.
404Not held by Portaldot (never stored, or expired), or no such path.
416Range outside the file.
502The node returned bytes that do not match the CID. Refused.
503The Portaldot node did not answer.

Edit this page on GitHub