News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

My implementation of createAttachment is failing

Started by Miles Lombardi, May 11, 2006, 02:03:06 PM

Previous topic - Next topic

Miles Lombardi

I found the function createAttachment in Subs-Post.php, so I am not *certain* on how to use it.
What I have done is the previous page Posts an uploaded file to the PHP, and then I create the array which is passed to createAttachment in the real SMF script:

$attachmentOptions = array(
'post' => 0,
'poster' => $ID_MEMBER,
'name' => $_FILES['sprite']['name'],
'tmp_name' => $_FILES['sprite']['tmp_name'],
'size' => $_FILES['sprite']['size'],
);

But it's been changed to my way f doing things (i hope).

I then pass it to createAttachement (Subs-Posts.php was required):

if (!createAttachment($attachmentOptions))
$context['error'] = 'Error creating image';


But it fails at the if gate. What can I do to figure out what the problem might be?

Advertisement: