Browse Source

Update FitsFormatter.php

Made D9 compliant
pull/907/head
Alan Stanley 5 years ago committed by GitHub
parent
commit
586427738c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Plugin/Field/FieldFormatter/FitsFormatter.php

2
src/Plugin/Field/FieldFormatter/FitsFormatter.php

@ -76,7 +76,7 @@ class FitsFormatter extends FormatterBase {
$transformer = \Drupal::getContainer()->get('islandora_fits.transformxml');
$fileItem = $item->getValue();
$file = File::load($fileItem['target_id']);
$url = Url::fromUri($file->url());
$url = Url::fromUri(file_create_url($file->getFileUri()));
$link = Link::fromTextAndUrl("Link to XML", $url);
$link = $link->toRenderable();
$contents = file_get_contents($file->getFileUri());

Loading…
Cancel
Save