Skip to content

Release 0.12.0

Latest

Choose a tag to compare

@github-actions github-actions released this 10 Nov 03:01
bbaddd9

Highlights

HTTP API for uploading images

POST /api/v1/createImages uploads images from scripts, apps, and other tools.

curl -H "Authorization: Bearer $IMGDD_API_KEY" \
  -F "image=@photo.png" -F "expires_in=3600" \
  https://your-host/api/v1/createImages
  • Anonymous or with an API key. Anonymous uploads use the guest size limit and per-IP rate limiting. With Authorization: Bearer <key>, images belong to the key's account and use that account's limit. An invalid or revoked key returns 401; it is never treated as anonymous. Browser sessions are not accepted.
  • Up to 5 images per request. The response has one result per file, so one bad file doesn't fail the others.
  • Optional expires_in, in seconds, from 60 to 31536000 (365 days). Expired images are deleted by the periodic cleanup task.
  • Intention-based design. Every call is POST /api/v1/<intention>, named for what it does, rather than resource URLs whose meaning depends on the HTTP method.

Full documentation is on each instance at /docs/api, linked from the footer.

API keys

Create, view, and revoke keys under Profile → API keys. A key's secret is shown once, when it is created. Only a hash is stored.

Fixes

  • Upload temp files are cleaned up. Uploads larger than the size limit were rejected, but their multipart temp files were left on disk. /upload and the new API now delete them.
  • Clearer upload errors. A file that is corrupt, truncated, or not a supported image is rejected with 400 instead of 500. A file that can't be read is rejected instead of being processed with partial data.

Upgrading

This release adds database migration 000009 (a new api_key_table). It only adds a table; no existing data changes and there are no breaking changes.

Run imgdd migrate before starting the server, or start it with --migrate (MIGRATE_ON_SERVE=true).

Full changelog: 0.11.0...0.12.0