Storage
Manage S3-compatible storage buckets for files, images, and assets.
espacetech storage create
Create a new storage bucket.
espacetech storage create my-assets --project my-appespacetech storage list
List all storage buckets.
espacetech storage listespacetech storage credentials
Get S3 credentials for a bucket.
espacetech storage credentials my-assetsOutput:
Endpoint: https://s3.espace-tech.com
Access Key: GKxxxxxxxx
Secret Key: xxxxxxxx
Bucket: st-myassets-a1b2c3d4
Region: espace-garageUse these credentials with any S3-compatible client (AWS SDK, MinIO client, etc.).
espacetech storage link
Link a storage bucket to a project. Injects S3_ENDPOINT, S3_ACCESS_KEY, S3_SECRET_KEY, and S3_BUCKET environment variables.
espacetech storage link my-assets --project my-appespacetech storage delete
Permanently delete a bucket and all its files.
espacetech storage delete my-assetsThis permanently deletes the bucket and all files. This action cannot be undone.
Using Storage in Your App
Once linked, use the injected environment variables or the SDK for a better developer experience:
import { EspaceTech } from "@espace-tech/sdk";
const client = new EspaceTech({ apiToken: process.env.ESPACE_TECH_TOKEN! });
// Upload
await client.storage.upload("bucket-id", "images/photo.jpg", file);
// Download
const file = await client.storage.download("bucket-id", "images/photo.jpg");
// Presigned URL (for frontend use)
const { url } = await client.storage.getDownloadUrl("bucket-id", "images/photo.jpg");
// → Use directly in <img src={url} />