Cloud storage
Only available with a Pro subscription on hosted Pages CMS.
Keep large or numerous media files out of Git by storing them in an S3-compatible bucket, on AWS S3 or Cloudflare R2. Editors use the media library as usual; files go to the bucket and content stores their public URLs.
On R2, editors can browse and upload files. Pages CMS disables rename, move and delete because R2 cannot guarantee that a file stays at the same revision during deletion.
Only managers can manage connections. You'll need:
- A bucket, its endpoint and region, and access credentials.
- A public URL that serves the bucket's files, such as a CDN or custom domain.
- A CORS policy for the Pages CMS origin, including
https://, that allowsPUT,GETandHEAD, allows request headers and exposesETag. See R2 CORS for an example.
1. Connect the bucket
- Open the project's Cloud storage page and create a connection.
- Give it a name and an ID, such as
website-assets. You'll use the ID in.pages.yml. - Enter the bucket, region, endpoint and credentials.
- Save. Credentials are stored on the server and never sent to the browser.
2. Point a media library at it
Add storage with the connection ID to a media library:
media:
- name: images
label: Images
storage: website-assets
input: uploads
output: https://assets.example.com/uploadsstorage: the connection IDinput: folder inside the bucketoutput: public URL prefix saved in content
Uploading photo.jpg stores uploads/photo.jpg in the bucket and saves https://assets.example.com/uploads/photo.jpg in content.
Making the bucket publicly readable is up to you and your provider. Previews inside Pages CMS use short-lived signed URLs, which are never saved in content and don't make the bucket public.
Use a bucket provided by your operator
If your Pages CMS operator provides a shared bucket, a project manager can select it for an individual media library with storage: "@hosted" in .pages.yml. Keep the quotes around @hosted. This option requires Pro and stores each repository’s media separately.
Change or disconnect
- Rename the ID with the connection's rename option, then update
storagein.pages.ymlon every branch that uses it. - Disconnect removes the connection from Pages CMS. Files in the bucket aren't touched. Update or remove media libraries that used it.
- After a repository transfer, connections must be re-entered: edit the connection and enter the bucket details and credentials again.
When Pro ends
Connections and files stay, but you can't add, edit or disconnect connections until you resubscribe. See Plans and billing.