Every test suite that touches uploads eventually needs a real PDF, a video that seeks, a CSV with a broken row somewhere in it. Usually someone hotlinks a file from a random site, and a few months later it moves or changes and the test breaks for no reason.
loremfile.dev is 228 synthetic files across 78 formats, all CC0, served with CORS and byte ranges, with a SHA-256 for every file.
Use it:
curl -O https://loremfile.dev/pdf/a4-3pages.pdf
Verify it (bytes at a published URL don't change):
import hashlib, json, urllib.request
manifest = json.load(urllib.request.urlopen("https://loremfile.dev/manifest.json"))
entry = next(e for e in manifest["fixtures"] if e["path"] == "pdf/a4-3pages.pdf")
data = urllib.request.urlopen("https://loremfile.dev/" + entry["path"]).read()
assert hashlib.sha256(data).hexdigest() == entry["sha256"]
Or all at once: sha256sum -c sha256sums.txt --ignore-missing (macOS: shasum -a 256 -c sha256sums.txt --ignore-missing).
Edge cases, on purpose
edge/pdf-truncated-60pct.pdf, edge/jpg-truncated-50pct.jpg, edge/mp4-truncated-50pct.mp4, edge/zero-byte.csv, edge/json-bom.json, edge/json-trailing-comma.json, edge/csv-ragged-rows.csv - 19 in total, for when you want to test that a parser fails.
One Limitation:
Around 30 requests/second per IP, 429 above that. A normal test suite should be fine.
Use it in GitHub Actions
Also supports direct integration with Github Actions. Every file gets checked against its hash, and the step fails if a byte's off:
- uses: kumarprabhashanand/loremfile/action@action-v1
with:
paths: pdf/minimal.pdf mp4/720p-5s.mp4
formats: svg
How it's built
Everything's generated from synthetic data by open-source code (MIT) in a pinned container, pushed to Cloudflare R2, and archived as a GitHub release so anyone can mirror it. No accounts, cookies, or analytics. Claude agents did most of the design and implementation here.
Top comments (0)