Insert attachment after Thread created (via script)

Status
Not open for further replies.

alex31337

New member
Hello! To create thread in 2.0v we use such a code:
$creator = \XF::service('XF:Thread\Creator', $forum);
$creator->setContent($title, $message);
$creator->setUser($user);
$creator->setPrefix($forum['default_prefix_id']);
$creator->setIsAutomated();
$creator->save();

Everything is fine. But how can I attach an image to this thread? I can't workaround this problem for a long time. Please help!
 
Upvote 0
Status
Not open for further replies.
Top Bottom