Fixing Silent File Upload Failures — Storage Env Vars Now Documented
Fixing Silent File Upload Failures — Storage Env Vars Now Documented
Release: v1.0.42
The Problem
Several environment variables that src/platform/storage/client.ts relies on to initialise the S3-compatible storage client (getS3Client()) were never added to .env.example. This meant that anyone standing up a new development environment or deploying to a fresh server would be missing the credentials entirely — and file uploads would fail silently at runtime with no visible error.
Affected upload flows included:
- Avatar uploads — member profile images
- Logo uploads — gym and brand assets
- PT session attachments — coach-uploaded files attached to personal training sessions
Why It Was Silent
When getS3Client() is called without valid credentials, the AWS SDK constructs the client successfully — it only fails at the moment a network request is made. Depending on error handling at the call site, that failure may be swallowed or logged only server-side, giving the end user no feedback and making the issue hard to trace during development.
The Fix
The following block has been added to .env.example to ensure these variables are visible to every developer and operator from day one:
# ─────────────────────────────────────────────────────────────
# File Storage (Tigris / S3-compatible)
# ─────────────────────────────────────────────────────────────
AWS_ACCESS_KEY_ID= # Tigris or S3 access key
AWS_SECRET_ACCESS_KEY= # Tigris or S3 secret key
AWS_REGION= # e.g. auto (Tigris) or us-east-1
AWS_ENDPOINT_URL_S3= # e.g. https://fly.storage.tigris.dev (leave blank for real S3)
BUCKET_NAME= # e.g. posibl-uploads
Setting Up Storage
The platform supports any S3-compatible object storage backend. Two common configurations are described below.
Using Tigris (recommended for Fly.io deployments)
AWS_ACCESS_KEY_ID=your_tigris_access_key
AWS_SECRET_ACCESS_KEY=your_tigris_secret_key
AWS_REGION=auto
AWS_ENDPOINT_URL_S3=https://fly.storage.tigris.dev
BUCKET_NAME=your-bucket-name
Obtain credentials from the Tigris dashboard or via the Fly.io CLI when the Tigris storage extension is attached to your app.
Using AWS S3
AWS_ACCESS_KEY_ID=your_aws_access_key_id
AWS_SECRET_ACCESS_KEY=your_aws_secret_access_key
AWS_REGION=us-east-1
AWS_ENDPOINT_URL_S3=
BUCKET_NAME=your-bucket-name
Leave AWS_ENDPOINT_URL_S3 blank to use the standard AWS S3 endpoint for the given region.
Checklist for Existing Deployments
If your environment was provisioned before v1.0.42, run through the following:
-
AWS_ACCESS_KEY_IDis set and non-empty -
AWS_SECRET_ACCESS_KEYis set and non-empty -
AWS_REGIONis set (e.g.autoorus-east-1) -
AWS_ENDPOINT_URL_S3is set if using a non-AWS provider -
BUCKET_NAMEpoints to an existing, accessible bucket - The bucket has appropriate read/write permissions for the credentials provided
- Restart your server / redeploy after adding the variables
Affected Source File
src/platform/storage/client.ts — lines 7–16 define the getS3Client() factory that reads all five variables from process.env.