I'd like to lr-notebook to index attachments by type, and display them on a pages like /files/json or /files/pdf. Rather than just indexing by file extension, I'd like to create my own custom groups of file extensions (e.g. images = .jpg, .png, gif; documents = .doc, .pages, .pdf).
The first thing we need is a files.ini model. This will correspond to a content subfolder files
which can just contain an empty contents.lr.
[model]
name = Files
label = Files
hidden = yes
protected = yes
[children]
model = filetype
Next we need a filetype model.
[model]
name = Filetype
label = {{this.name}}
hidden = yes
[fields.name]
label = Name
type = string
[fields.extensions]
label = Extensions
type = strings
[children]
replaced_with = site.query('/projects')