- Description:
This key defines paths for your Rich Text editors or File inputs.
If undefined at higher levels of the configuration cascade,
pathswill default to any values configured in the CloudCannon configuration file.- Appears in:
├── _inputs │ └── * │ ├── Rich Text Input │ │ └── options │ │ └── paths │ ├── File Input │ │ └── options │ │ └── paths │ └── URL Input │ └── options │ └── paths └── _editables ├── content │ └── paths ├── block │ └── paths ├── link │ └── paths ├── image │ └── paths └── text └── paths- Type:
Object- Properties:
This key defines the path for the location of statically copied assets for DAM files.
Show examplesHide examples
In this example, we have configured the DAM static path for the
blogCollection.Copied to clipboardcollections_config: blog: paths: dam_static: /assets/dam/{ "collections_config": { "blog": { "paths": { "dam_static": "/assets/dam/" } } } }This key defines the path for the default location of newly uploaded DAM files.
You can use dynamic placeholders for
uploadsanddam_uploads.Show examplesHide examples
In this example, we have configured the DAM uploads path for the
blogCollection.Copied to clipboardcollections_config: blog: paths: dam_uploads: /dam/uploads/blog/{ "collections_config": { "blog": { "paths": { "dam_uploads": "/dam/uploads/blog/" } } } }This key defines the path for the name of the uploaded file, when uploading DAM files.
Show examplesHide examples
In this example, we have configured the DAM uploads filename path for the
blogCollection.Copied to clipboardcollections_config: blog: paths: dam_uploads_filename: '{filename|slugify}'{ "collections_config": { "blog": { "paths": { "dam_uploads_filename": "{filename|slugify}" } } } }This key defines the path for the location of statically copied assets.
Show examplesHide examples
In this example, we have configured the static path for the
blogCollection.Copied to clipboardcollections_config: blog: paths: static: /assets/{ "collections_config": { "blog": { "paths": { "static": "/assets/" } } } }This key defines the paths for the default location of newly uploaded site files.
You can use dynamic placeholders for
uploadsanddam_uploads.Defaults to:
uploadsShow examplesHide examples
In this example, we have configured the uploads path for the
blogCollection.Copied to clipboardcollections_config: blog: paths: uploads: /uploads/blog/{ "collections_config": { "blog": { "paths": { "uploads": "/uploads/blog/" } } } }This key defines the path for the name of the uploaded file.
Show examplesHide examples
In this example, we have configured the uploads filename path for the
blogCollection.Copied to clipboardcollections_config: blog: paths: uploads_filename: '{filename|slugify}'{ "collections_config": { "blog": { "paths": { "uploads_filename": "{filename|slugify}" } } } }This key toggles whether CloudCannon will use relative paths instead of absolute paths for uploaded files.
Setting this key to
truewill make CloudCannon use relative paths for uploaded files, which are relative to the file being edited rather than the repository root.Defaults to:
falseShow examplesHide examples
In this example, we have configured uploads to use relative paths for files uploaded in the Content Editor.
Copied to clipboard_editables: content: paths: uploads_use_relative_path: true{ "_editables": { "content": { "paths": { "uploads_use_relative_path": true } } } }- Examples:
In this example, we have configured paths for the
blogCollection to set custom upload and static paths.Copied to clipboardcollections_config: blog: paths: uploads: /uploads/blog/ static: /assets/{ "collections_config": { "blog": { "paths": { "uploads": "/uploads/blog/", "static": "/assets/" } } } }