Storage & Quotas

Every plan includes a storage quota. Stashly tracks usage in real-time and enforces limits before uploads are accepted.

How Storage Is Calculated#

Storage is measured as the sum of all stored file sizes within a tenant. This includes:

  • —Files in all buckets
  • —Files in trash (pending permanent deletion)
  • —Files in active upload sessions

Directories do not consume storage — only file bytes count.

Quota Models#

Solo Plan (Individual Users)

Individual users have a single storage quota applied to their entire account.

PlanStorageMax file size
Free5 GB100 MB
Pro100 GB5 GB
Max1 TB25 GB

Team Plan (Tenant with Members)

Team plans allocate a pool quota to the tenant. Admins can sub-allocate storage to individual members.

PlanTotal storagePer-member default
Team Starter100 GB10 GB
Team Pro500 GBConfigurable
Team EnterpriseCustomConfigurable

Team admins can update per-member storage limits via the Team API.

What Happens When Quota Is Exceeded#

  1. —Upload session init is blocked — POST /api/user/upload/init returns 413 Quota Exceeded
  2. —Active sessions are not terminated — files already in a session can still finish uploading
  3. —Dashboard warning shown — the user/admin portal displays a banner
  4. —Email notification sent — at 80%, 95%, and 100% usage thresholds
{
  "success": false,
  "message": "Storage quota exceeded",
  "data": {
    "used": 107374182400,
    "limit": 107374182400,
    "unit": "bytes"
  }
}

Checking Your Usage#

GET/api/user/settingsJWT Required

Get the authenticated user's storage settings and current usage.

200Settings response
{
  "success": true,
  "data": {
    "storageUsed": 5368709120,
    "storageLimit": 107374182400,
    "storagePercent": 5,
    "plan": "pro"
  }
}
GET/team/storageJWT Required

Get the team's total storage breakdown by member (admin only).

200Team storage breakdown
{
  "success": true,
  "data": {
    "total": 536870912000,
    "used": 128849018880,
    "members": [
      { "userId": "usr_01j9", "name": "Alice", "used": 64424509440, "limit": 107374182400 }
    ]
  }
}

Freeing Storage#

To free storage:

  • —Empty trash — DELETE /api/trash/empty permanently removes all trashed files
  • —Delete unused files — remove files no longer needed
  • —Cancel stale sessions — POST /api/user/upload/:sessionId/cancel reverts and frees session storage
✓

Trash counts toward quota

Files in trash still count toward your storage quota until permanently deleted. Empty trash regularly to free space.