Env vars
A connected project gets these runtime env vars, with the connection’s prefix in front if it has one:
Use
S3_ENDPOINT from your apps. Use S3_PUBLIC_ENDPOINT for anything outside the platform: your own machine, CI, and presigned URLs you hand to browsers.
The keys only work for this bucket. They can list, read, write and delete its objects, including multipart uploads and object tags.
Client settings
Set these in any S3 client you point at a Files store:- Path-style addressing: the bucket goes in the path, as in
https://s3.<apps domain>/st-<id>/<key>, not in the host name. - Checksums only when required: the store rejects the checksum trailers that recent AWS SDKs send by default.
Connect from Ktor
This example uses the AWS SDK for Java (software.amazon.awssdk:s3) in your server module:
MEDIA_S3_BUCKET.
Browse files in the panel
The store’s Browser tab lists the bucket’s files. Folders are the parts of the keys between/. Click a folder to open it, and use the path above the list to go back up. The list shows 200 entries at a time; click Load more for the rest, and Refresh to reload it.
- Download: the download button next to a file saves it.
- Upload: click Upload and pick one or more files. They go into the folder you have open. A file with the same name replaces the one in the bucket.
- Delete: the delete button next to a file removes it from the bucket for good. Files stores keep no older versions.
S3_PUBLIC_ENDPOINT.
Browsing and downloading need the Viewer role. Uploading and deleting need the Developer role.
Public read
By default every request to the bucket has to be signed with its keys or come with a presigned URL. To serve files to anyone, an admin turns on Public read in the Access section of the store’s Settings tab. With public read on:- Anyone with an object’s URL can download it without signing. The URL is
S3_PUBLIC_ENDPOINT/S3_BUCKET/followed by the key, for examplehttps://s3.<apps domain>/st-<id>/avatars/42.png. - Nobody can list the bucket without its keys.
- Uploads and deletes still need the keys.
- In the Browser tab, developers get a button next to each file that copies its public URL.