Kirby Builder - Unable to select files in textarea

I’m sorry if this should be in the plugins section, but I’m wondering if it could be solved with the correct files query for a textarea field.

For some reason, when using Kirby Builder, attempting to select a file in a textarea field causes the error:

Invalid file model type: kirby-builder/pages/example-page-slug/fields

as per the following github issue:

It’s a bit perplexing as it does work when uploading new files.

However, looking at the function where this error lies, I was wondering if there is indeed a correct way to set the textarea/files/query parameter so that it works correctly, or if a change has to occur with Kirby Builder’s code itself?

I’ve tried the painfully obvious page.images, page.files and parent.files to no avail, the error remains consistent in all circumstances.

I am using Kirby 3.3.0

Hi @texnixe I’m sorry to bump this and ping you here but I’m wondering if this is a bug in builder or perhaps a bug in the API?

I’ve explored it a bit deeper:

But I’m wondering with regards to a blueprint like so:

label: Content
type: builder
  # Filepicker 'select' calls
  # https://domain/api/kirby-builder/pages/slug/fields/content+text+text/files?page=0
    name: Text
    label: Text
        label: Text
        type: textarea
  # Filepicker 'select' calls
  # https://domain/api/kirby-builder/pages/slug/fields/content+media+files?page=0
    name: Media
    label: Media
        label: Files
        type: files

why the API call for the textarea actually does indeed result in a 400 bad request when the files field works perfectly? The more I think about it, I’m unsure it is a bug with builder, and am wondering if there is any way it might be a bug in the API.

I’ve also tried adjusting the blueprint so there’s no conflict between the fieldset and field names, but it doesn’t make a difference.

These API routes are created in the builder plugin, I don’t think this is a Kirby bug.