Get paths of files attached to the node from field name
You can get it like this:

$file_uri = $node-&gt;field_machine_name-&gt;entity-&gt;getFileUri(); 

If your field allows for more than 1 value, then:

$file_uris = array();
foreach ($node-&gt;field_machine_name as $value) {
  if ($value-&gt;entity) {
    $file_uris[] = $value-&gt;entity-&gt;getFileUri();
  }
}