Skip to main content

Storage (Uploads)

There are two different supported storage methods available to handle uploading assets for templates:

  • Local
  • S3

Local

This is the default storage method and no configuration is required. It will by default serve imagery from your base URL.

S3

The S3 storage method allows for configuring any S3-compatible object storage service such as AWS S3, Digital Ocean Spaces, Minio, etc.

Under the hood it is utilizing the AWS S3 SDK so please consult whatever service you are using as to what values should be used in what places.

The URL that is generated for referencing each image can be overriden using the STORAGE_BASE_URL key.

Configuration

KeyTypeRequiredDefaultDetails
STORAGE_DRIVERs3true
STORAGE_BASE_URLstringtrueOverride the base path used for image URLs
STORAGE_S3_BUCKETstringtrueThe name of your bucket
STORAGE_S3_ENDPOINTstringfalseIf using a service other than AWS S3, the endpoint for the object storage
STORAGE_S3_FORCE_PATH_STYLEbooleanfalsefalseEnable if using a service other than AWS S3
AWS_REGIONstringfalseus-east-1The region your bucket is in
AWS_ACCESS_KEY_IDstringtrue
AWS_SECRET_ACCESS_KEYstringtrue

Usage With Other S3-Compatible Services

If you want to utilize a S3-compatible object storage service other than S3 you will need to configure a few additional parameters to ensure the AWS defaults are not being used:

  • STORAGE_S3_FORCE_PATH_STYLE: Set this to true
  • STORAGE_S3_ENDPOINT: Enter the base URL provided by the service you are using.

Use with CDN

If you are utilizing a CDN in front of your bucket, you can set the URL of the CDN to be used for all images by utilizing the STORAGE_BASE_URL parameter. Utilizing this parameter will rewrite all image URLs to use that as the base url instead of the S3 endpoint.