Skip to content
Snippets Groups Projects

Fixes FILE_STATUS_PERMANENT constant not found

1 file
+ 3
2
Compare changes
  • Side-by-side
  • Inline
@@ -2,10 +2,11 @@
namespace Drupal\migrate_file\Plugin\migrate\process;
use Drupal\file\Entity\File;
use Drupal\file\FileInterface;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\Row;
use Drupal\file\Entity\File;
/**
* Create a file entity with a remote url without downloading the file.
@@ -69,7 +70,7 @@ class FileRemoteUrl extends ProcessPluginBase {
$file = File::create([
'uri' => $value,
'uid' => $this->configuration['uid'],
'status' => FILE_STATUS_PERMANENT,
'status' => FileInterface::STATUS_PERMANENT,
]);
$file->save();
Loading