Skip to content

blockmurder/bolt-custom-upload-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Upload Path

Lets you customize the upload path of a specific content with the option upload_dir. All fields in this specific content type using Bolt.cm upload functionality are using this custom path afterwards.

For example the following content type uploads the images/files to galleries/{slug}:

galleries:
    name: Galleries
    singular_name: Gallery
    fields:
        title:
            type: text
            group: "Gallery"
        slug:
            type: slug
            uses: [ title ]
        files:
            type: filelist
        images:
            type: imagelist
            extensions: [ jpg ]
    show_on_dashboard: true
    default_status: publish
    searchable: false
    upload_dir: galleries/{slug}/

In the example above the following variable are supported in the path: {slug}, {title}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages