Lack of interest importPostAttachment addition

Paul M

Well-known member
Please add an extra array to this function ;

importPostAttachment($oldAttachmentId, $fileName, $tempFile, $userId, $postId, $date, array $attach = array(), array $extra = array())

and modify $dataextra to include it

$dataExtra = array_merge(array('upload_date' => $date, 'attach_count' => 1), $extra);

This is so extra information can be passed direct to the attachment data by importers (such as file_size).


XenForo developer
Staff member
As a point about the file size, it's calculated in the process of inserting the file. That was one of the fixes in the B2 importer (actually, not in the importer itself).

Paul M

Well-known member
Ah, ok. That was the main reason for asking.

Still, it might be handy if the facility was there anyway, it certainly wouldnt harm anything. :)