Upload Providers
Upload provider configuration lives in apps/strapi/config/plugins/upload.ts.
See the Strapi Media Library docs for the upstream media feature.
Local storage is usually only for local development. In hosted environments, use S3 or another external store because many platforms do not provide persistent container filesystem storage, for example Heroku dynos. External storage is also useful when media should be served through a DAM, CDN, or dedicated asset pipeline.
Provider resolution priority is:
- Azure Blob Storage
- AWS S3
- Local upload provider
The first provider whose required environment variables are present wins.
Azure Blob Storage
Provider: strapi-provider-upload-azure-storage. See also Azure Blob Storage.
Required environment variables:
| Var | Purpose |
|---|---|
STORAGE_ACCOUNT | Azure storage account name. |
STORAGE_CONTAINER_NAME | Container name. |
STORAGE_ACCOUNT_KEY or STORAGE_ACCOUNT_SAS_TOKEN | Credentials when STORAGE_AUTH_TYPE=default. |
STORAGE_AUTH_TYPE=msi | Managed Identity mode. Assign the Storage Blob Data Contributor RBAC role instead of providing keys. |
Configure Blob service CORS to allow GET, HEAD, and OPTIONS from the Strapi admin origin. Without this, media appears in the gallery but fails in the admin modal.
The Azure Blob domain (*.blob.core.windows.net) is whitelisted in apps/strapi/config/middlewares.ts. Add custom STORAGE_URL or STORAGE_CDN_URL domains there if you use them.
AWS S3
Provider: @strapi/provider-upload-aws-s3. See also the Strapi AWS S3 upload provider docs and Amazon S3.
Required environment variables:
| Var | Purpose |
|---|---|
AWS_ACCESS_KEY_ID | Access key. |
AWS_ACCESS_SECRET | Secret access key. |
AWS_REGION | Bucket region. |
AWS_BUCKET | Bucket name. |
*.amazonaws.com is whitelisted in apps/strapi/config/middlewares.ts. Add a CDN_URL host if you use a CDN.