I’m trying to make kirby save files custom folder: /content/client_files.
- I created blueprint "/site/blueprint/files/client_file.yml
title: Image
accept:
mime: .csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel
fields:
alt:
label: Alt Text
type: text
width: 1/2
required: true
caption:
label: Caption
type: textarea
- I created blueprint “/site/blueprint/pages/client_files.yml” - it will be parent.
title: Client files
# preset: page
- I created templates “client_file.php” and “client_files.php” in /site/templates/ directory (I’m not sure, if they are required).
- I created folder /content/client_files
- I created file /content/client_files/client_files.txt
- I created blueprint tab in site.yml:
tabs:
<...>
files:
label: Client files
fields:
client_file:
type: files
label: Downloads
multiple: true
translate: false
uploads:
parent: client_files
template: client_file
When I try to upload file, I get error that file can not be created on null. If I comment #parent: client_files, then the file is uploaded to /content. What I’m missing? I can not find documentation, how could I do this in the correct way.