Skip to main content

Apostrophe CMS

Apostrophe CMS supports any S3-compatible storage backend through the @apostrophecms/uploadfs module's S3 driver.

Install

npm install @aws-sdk/client-s3

Configure

app.js
require('apostrophe')({
shortName: 'my-site',
modules: {
'@apostrophecms/uploadfs': {
options: {
backend: 's3',
bucket: 'my-apostrophe-uploads',
endpoint: 'https://s3.filebase.io',
region: 'auto',
key: process.env.FILEBASE_KEY,
secret: process.env.FILEBASE_SECRET,
s3ForcePathStyle: true,
},
},
},
});

Public URLs

If your bucket is public, Apostrophe will generate URLs like:

https://my-apostrophe-uploads.s3.filebase.io/attachments/<id>-original.jpg

These are served by the Filebase CDN and benefit from edge caching.

Image processing

Apostrophe generates resized image variants on upload. They're written into the same bucket under predictable keys (<id>-{size}.jpg). Set a long Cache-Control on these — they're immutable once generated.

What's next