back to home

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.

01

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.

02

ajax stream xhr

The file is sent via XMLHttpRequest with live progress tracking. The progress bar reflects real upload percentage.

03

server validation controller

CSRF token, file type, and size are re-validated server-side. The request is rejected if anything looks wrong.

04

slug generation unique id

A short, collision-resistant slug is generated (e.g. x7kQp) and checked for uniqueness before being saved.

05

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

128MB
Max file size
permanent storage
Allowed types
5ch
Slug length

api reference

dogpaste exposes a simple REST API. No authentication is required for public uploads.

POST /upload

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
cURL example
# 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"
}
GET /{slug}

Retrieve or preview a file by its slug. The response type matches the file's original MIME type.

DELETE /{slug}

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