Hey,
This is not really an issue but a behaviour I’d like to understand.
I’m making a website where the user can upload images.
Here is my blueprint :
So when the user upload a file to that part of the blueprint, it get the template videoimg and is now displayed in the medias list. So the project.txt is like that:
There is an Hero field because the user can upload another image that will be used as an Hero for the project.
I later fetch my wanted files in my project.php like that : <?php foreach ($page->images()->filterBy('template', 'videoimg')->sortBy('sort') as $image) : ?> and so on.
Now, when I remove the image for the medias section, obviously the image is not removed from the project, but from that list. So it’s kept in the project files, which is not really wanted.
So I’m wondering if it’s really the good way to do if I want my user to upload different type of files in different sections (hero and medias here)
Maybe you want 2 files sections instead of 2 files fields ? Especially if you then search for them by template, and not via the $page->medias()->toFiles() field method.