I’ve managed to create a virtual pages set-up out of a CSV file following this recipe (it worked great!). This CSV file is basically a database of an images archive, so I would like to be able to upload to the same parent folder all the images as well and get each image to display in the correct virtual page. The name of the image file is stored in the CSV (Image ID), so ideally it shouldn’t be a problem to look up the file with the same name and display it.
The only problem is it worked fine as long as I was copying the images directly to the parent folder, but once I used the backend to upload images it no longer worked (I assume since it was now looking for it in the media folder).
I was trying to also look at this recipe and bake one of my own, but without any luck…
What am I doing wrong and how can I fix this? would appreciate any help as always
I don’t really understand this part. The parent page is a “real” page folder, and you use it to store the images which are referenced in the child pages, right? It shouldn’t make a difference how these images find their way to the parent, if you just copy them there or upload them via the Panel.
Hi @texnixe, yes indeed. I also didnt expect that kind of issue, but when I paste the image files directly to the “real” parent folder. I can fetch them in the virtual pages and in the panel for example:
Yeah, also just tried it again and on a different browser
Is there maybe another approach I could try? It’s all quite strange and I can’t seem to figure it out why it’s behaving this way…
Hi @texnixe, I think I figured it out (phew…) all my scans files have their file name in uppercase letters (i.e. KB003-1). The Image ID in the CSV file is also stored with capital letters. When I copy the files directly into the folder there’s no problem and file names stay the same, but uploading via the panel automatically reformats the names to small letters (i.e. kb003-1).
So I guess its a very unique issue to my case…
Is there a way I could change that behaviour of the panel regarding file upload, or just store my ‘Image ID’ with some kind of ->lower()?
could be also be worth it to check out a more “manual” way and change the image ids in the CSs itself