Fixed  Import - Attachments Problematic

Mert

Well-known member
After importing the attachments thumbnails display correct but the file size for all attachments are listed as 0 and when you click on attachments i always get not found error both when SEO options are enabled or disabled

attachments-after-import.PNG
 

z3r010

Member
Has anybody figured this out yet as I'm having the same problem with imported and uploaded attachments.
 

boban

Well-known member
For some reason the field "file_size" in the database table "xf_attachment_data" has records value 0.
Just copy the field "filesize" from vbulletin table "attachment" to xenforo table "xf_attachment_data" field "file_size". It worked for me.

Vbulletin and xenforo are in the same database:

Code:
UPDATE xf_attachment_data
SET xf_attachment_data.file_size =
(
SELECT attachment.filesize FROM attachment
WHERE xf_attachment_data.upload_date = attachment.dateline LIMIT 1
)
 

Mike

XenForo developer
Staff member
Appears to be fixed now. If you're interested, it appears to just need the stat cache cleared. It looks like it must be reusing some of the temporary files.
 
Top