So the flow should be:
1) copy /uploads/ under /files/uploads
2) do System > File Manager > Synchronize
3) run my import extension which it does something similar:
PHP Code:
$posts = getPosts();
foreach ($post in $posts)
{
// Is this what you mean?
$objFile = \FilesModel::findByPath($post['image_path']);
if ($objFile !== null)
{
$uuid = $objFile->uuid;
}
else
{
$uuid = '';
}
// end of this i think you mean :)
$arrNews = array(
// news data
'singleSRC' => $uuid,
);
// insert news
$this->Database->prepare('INSERT INTO tl_news %s')->set($arrNews)->execute();
}
Is this what you mean?
Bookmarks