Fixed Attachments Name gets cut-off

Affected version
2.0 RC3
G-day, When testing a long file name I found out it gets cut-off and loses its extension causing the download to also lose its extension.

Happens on XF 2.0 RC3, at first I thought it was because of the varchar(100) in the database but changing that to 250 did not "fix" it.

[edit] Original file name: "chen_long_name_test_test_test_test_test_test_test_test_test_test_test_test_test_test_test_test_test_test_test_test_test_test_test_test_test_test.png"


Last edited:


XenForo developer
Staff member
This is likely because of the limit set in the Entity structure (\XF\Entity\AttachmentData::getStructure()) but we may need to do some name manipulation when a file is uploaded in order to ensure that the extension is always preserved...

Something like [long-filename-trimmed-to-95-chars].[extension]

I'll look into that.