Problem - have (~ 1000) panel pages which was created dynamically (when users uploaded files from frontend). It was Kirby 2, now migrated to Kirby 3. And now images are not visible in panel page file section (because file is alone without its meta (*.txt) file).
Need to admit, that parent page shows each page cover photo, but if I open particular page - image section is empty.
My blueprint looks like this:
columns:
- width: 1
fields:
files:
label: Images
type: files
p.s. everything is fine if I upload image normally through upload in panel, then meta *.txt file for image is created and image is visible in panel page. But is it possible to show existing stored files?
Hi,
did you try to use a files section instead of the files field?
Thanks for suggestion - just checked - also section is empty:
sections:
image:
type: files
template: single-image
max: 1
layout: cards
Not sure I understand. So each file is in a separate page?
Files sections don’t depend on the metadata files being present, but you have set a template in your section, so only files with that template assigned would show up. But no metadata, no file template.
User fills up form with email, name etc, adds file. File + entered info is sent to Kirby CMS, which creates page in panel and stores that file (therefore admin can open Kirby panel and check what is uploaded). Normally when we upload file (image) via panel page, then *.txt fiel with same name as file is created.
In Kirby 2 that file was visible under Files section, but in Kirby 3 file field is empty.
So seems that I need to create that *.txt file in each page for each uploaded file… was hoping, that there are other ways
Probably I need to re-phrase my question - is it possible to auto select manually uploaded file?
Good news that I do not need to create *.txt file for each image, its enough to click on “No files selected yet” and choose “Select” and then uploaded file is available in list… but it would take time to manually do so 1000 times…
Again, if you use a files section, you don’t have this problem.
Yes, You are right, sorry - did not get Your first comment. Now got it.
I was defining section / image, but section/files works perfectly! Thank You!
This works:
- width: 1
sections:
file:
type: files