Skip to Content
Go API referenceClasses, files & storage

Classes, files & storage

These modules connect classroom membership to binary objects and per-user quota tracking.

Classes

/api/v1/classes/ covers listing, search, creation, detail, members, join, leave, and QR responses. A class creator cannot leave their own class. Membership is an authorization boundary reused by uploads, assignments, sharing, and communications.

Upload lifecycle

/api/v1/uploads/ accepts multipart input with a file part and a class_obj UUID. Objects are written under the existing controlled key convention, the metadata row is committed, and the Go API asynchronously calls the private indexer. The 50MB upload limit is enforced at the Go boundary.

/api/v1/files/ preserves the unified compatibility view across own uploads, accepted shares, deleted records, restore, detail, and permanent deletion. File downloads are authorized streaming responses.

Storage quota

/api/v1/storage/ returns current quota, detailed usage, recalculation, and history. PostgreSQL aggregates non-deleted upload sizes; Redis only caches safe reads. A mutation that changes effective uploaded bytes must invalidate the matching user quota cache.

Last updated on