Query files from different page that is referenced in another field

No, that’s not possible out of the box. For a second field to query the value of the first it would be necessary that the first field is saved first.

To make this work, you would need a custom field that listens to changes of the first field.

See also: Programmatically change the content of the file field - #38 by bastianallgeier