Deleting files that are not used

Hi!

I’m using Kirby for quite a while now but with a recent project went for the layout method to create pages.

I uploaded files through layouts that were defined in blueprint as options of text heading or image.

Now I would like to render those files in the panel for the editor so that ones that are uploaded but not in use in any of the blocks in the layouts, can be alse deleted.

I hope my issue is clear, thank you in advance!

Kim

Might make the most sense to do a full text search in the content file for the file UUID, to find out if a file is used anywhere in a given page. Might get more complex if files from page x are also used in page Y.

To be able to delete files in the panel you need to add a files section (as opposed to a files field). With file fields you can upload and/or select previously uploaded files, with file sections you can upload, delete and modify uploaded files.

I’m usually adding such a section in a separate tab so that it doesn’t clutter up the general page editing UI.