Page field title in info of file section

I have files section, and would like to show the page title of a pages in the text:

type: files

headline: Slideshow
layout: cards
size: small
text: '{{file.project}}'

pages field (in file template)

    label: Project
    type: pages
    multiple: false
    query: site.find("work").children.template("project")

Is this possible?

Haven’t tested, but if it works then it should be

text: '{{file.project.toPage.title() }}'

or something like that.