#Alepha - Bucket
#Installation
Part of the alepha package. Import from alepha/bucket.
npm install alepha
#Overview
Raw blob storage. Not the application-facing API.
There is no bucket primitive. Declare file storage with $storage
(alepha/api/files), which pairs every blob with a files row and so can
offer paginated listing, TTL expiry, tags, checksums, creator tracking and
HTTP endpoints.
Inject FileStorageProvider directly only when you need blobs without a
database — you get upload / download / delete / deleteMany /
exists / list, keyed by a container name you manage yourself, and
nothing else.
All backends treat the container name as a key prefix inside one bucket
({APP_NAME}/{tenantId}/{container}/{fileId} — the tenant segment appears
when a tenant is active) or one directory on disk — never a separate cloud
bucket per container.
Providers: Memory (testing), Local filesystem, S3-compatible (AWS/MinIO), Cloudflare R2.
#API Reference
#Providers
R2FileStorageProvider— Cloudflare R2 storage provider.S3FileStorageProvider— S3-compatible file storage provider for Node.js.
#Environment Variables
Environment variables used to configure this module. These can be set in your .env file or through your deployment configuration.
| Variable | Type | Default | Description |
|---|---|---|---|
S3_ACCESS_KEY_ID |
string | Required | |
S3_BUCKET_NAME |
string | Required | |
S3_ENDPOINT |
string | Required | |
S3_REGION |
string | - | |
S3_SECRET_ACCESS_KEY |
string | Required |