documentation
Everything you need to use dogpaste — from drag-and-drop uploads to the full REST API.
what is dogpaste?
dogpaste is a minimal, privacy-respecting file host. Drop any file — image, video, archive, code snippet — and get a short link back within seconds. No accounts required.
Files are stored on private disk (not publicly listable) and served only via their unique slug. There's no browsing, no indexing, no ads.
upload flow
Every file goes through the same pipeline from the moment you drop it onto the page.
client-side validation frontend
File size and MIME type are checked in the browser before any data is sent. Files over the limit are rejected immediately.
ajax stream xhr
The file is sent via XMLHttpRequest with live progress tracking. The progress bar reflects real upload percentage.
server validation controller
CSRF token, file type, and size are re-validated server-side. The request is rejected if anything looks wrong.
slug generation unique id
A short, collision-resistant slug is generated (e.g. x7kQp) and checked for uniqueness before being saved.
storage + db persisted
The file is written to private disk storage and a metadata record (slug, MIME, size, expiry) is written to the database atomically.
limits & retention
api reference
dogpaste exposes a simple REST API. No authentication is required for public uploads.
Upload a file. Returns the slug and the full URL for the uploaded file.
| Field | Type | Required | Description |
|---|---|---|---|
| file | binary | yes | The file to upload (multipart/form-data) |
| _token | string | yes | CSRF token from the page meta tag |
# Upload via CLI curl -X POST https://dogpaste.com/upload \ -F "file=@/path/to/your/file.png" \ -H "X-CSRF-TOKEN: {token}" # Response { "slug": "x7kQp", "url": "https://dogpaste.com/x7kQp", "size": 204800, "mime": "image/png" }
Retrieve or preview a file by its slug. The response type matches the file's original MIME type.
Delete a file permanently. Requires the deletion token returned at upload time.
| Header | Required | Description |
|---|---|---|
| X-CSRF-TOKEN | yes | CSRF token from the page meta tag |