• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest importPostAttachment addition

Paul M

Well-known member
#1
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

try
{
$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).
 

Mike

XenForo developer
Staff member
#2
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
#3
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. :)