Views - context filter by nid
Add a relationship as Entity Reference: Referencing entity
Name it with the name of your content type for instance (easier to read in the view settings)
Check the Require this relationship option
Add a contextual filter with Content: Nid


Here comes the trick!


Choose Provide default value in the WHEN THE FILTER VALUE IS NOT IN THE URL fieldset
Type should be Content ID from URL


This will make Drupal fetch the context from the current URL where your block is displayed and loop through the files referenced by the current node.

TA-DAAA :-)