diff --git a/docs/configuration.md b/docs/configuration.md index 114d685e..39ca6f79 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -104,12 +104,12 @@ The S3 backend has the following fields: - `endpoint`: The URL of the S3 endpoint to connect to - `bucket`: The name of the S3 bucket to use for storage. This bucket must already exist and your credentials must have access to it - `region`: The region where your S3 bucket is located +- `path`: The base directory where all the media files will be stored (defaults to + root of the bucket) - `key`: Your Access Key ID - `secret`: Your Secret Access Key - `duration`: The time (in seconds) that signed requests to the S3 bucket will be valid (default: `30`) - `bucket_use_path`: Controls the structure of the path to files in S3. If `true`, the bucket name will be included as part of the file path. If `false` (or omitted), it will be used as the bucket name in the domain name -- `path`: The base directory where all the media files will be stored (defaults to - root of the bucket) - `directory_structure`: This is a table, used to configure how files are to be distributed within the media directory (see [Filesystem backend](#filesystem-backend) for details) diff --git a/src/config/mod.rs b/src/config/mod.rs index 7d4fe69a..7e658647 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -515,13 +515,15 @@ pub enum IncompleteMediaBackendConfig { endpoint: Url, bucket: String, region: String, + path: Option, + key: String, secret: String, + #[serde(default = "default_s3_duration")] duration: u64, #[serde(default = "false_fn")] bucket_use_path: bool, - path: Option, #[serde(default)] directory_structure: DirectoryStructure, },