0
我已經在drupal 8字段集合中創建了一個文件上傳,但我沒有收到。如何在drupal 8中保存字段集合無限字段?
請給我建議!我可以做什麼 ?
$node_data = [
'type' => ur_content_type,
'title' => 'ur title,
'langcode' => $this->languageManager()
->getCurrentLanguage()
->getId(),
];
$node = Node::create($node_data);
$node->save();
$file_content = my url of file
$directory = 'public://';
$file = file_save_data($file_content, $directory .
basename($url), FILE_EXISTS_REPLACE);
$fc->field_collect_filed_unlimited->setValue($file->id());
$fc->setHostEntity($cv_node);
$fc->save();
$Node->save();