Skip to content

0.46.0

Choose a tag to compare

@cliftonc cliftonc released this 28 Nov 05:35
· 16 commits to main since this release
0.46.0
20f915d

Rocketpod catches up with Rocketflare 0.46.0. Uploads go through /api/uploads in three steps (reserve, PUT, confirm). With STORAGE_DIRECT_UPLOADS on, the browser uploads straight to S3 on a presigned URL. Plugins gain uploadTargets.

Breaking:

  • The multipart POST /api/files?scope= and POST /api/ai/documents/upload are removed.
  • api.upload(target, file, { fields }) replaces api.upload(url, formData) in the UI, and ApiClient.upload(target, …) replaces postForm in the CLI.
  • apiBodyLimit takes one options object.

Migration: 0020_kit-pending-uploads adds pending_uploads, a tenant table with its RLS policy. Its user_id is nullable, with ON DELETE SET NULL.

What's new:

  • Uploads:
    • POST /api/uploads runs every check the old routes ran and answers a PUT URL.
    • POST /api/uploads/:id/confirm checks the stored object against what was declared.
    • A nightly prune deletes expired uploads and their objects.
  • Where the bytes go:
    • Off (the default): the server's own upload URL, streamed to the store, up to 50 MiB, with a 256-bit single-use token.
    • On: a presigned S3 PutObject with its type, length and If-None-Match: * signed. It needs an https endpoint and a bucket CORS rule (docs/DEPLOY.md § Direct uploads).
    • Under STORAGE_TENANT_FENCE=on, the URL is signed with the tenant's own session.
  • Plugins:
    • ServerPlugin.uploadTargets, with a required permission and a key rule.
    • confirm gets the tenant's storage, plus bucket as a deprecated alias so a Rocketflare 0.46 plugin compiles.
    • uploadPaths and uploadLimits still work, but are deprecated.
  • Fixes:
    • A document upload keeps its visibility and groups.
    • detach.sh no longer exits 141 on a long history.

Verified on the real Node stack: separate web and worker processes against their own Postgres and S3 gateway.

  • Direct uploads on and off: the store refuses a wrong type or length and a second write.
  • A confirm mismatch, and the nightly prune.
  • The fence in shadow mode. STORAGE_TENANT_FENCE=on needs real STS and was not tested locally.

Porting note: docs/upgrades/0.46.0.md. Rocketflare change by change: docs/FORK.md.