Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [Error Message] Attachment file extension length limit
#1
Not Solved
So we converted over from a VB forum. I thought initially that the attachment ids had all gotten broken because lots of attachments would fail when you tried to download one. It turned out that it was because the custom attachment types didn't get carried forward. So I started adding them back and discovered that there's apparently a limit on the file extension length. One of our types, CQCMacroPack, is apparently one or two characters over the limit and so we can't add back that custom attachment type, which means that all of those attachments are stranded.

SQL Error:1406 - Data too long for column 'extension' at row 1Query:INSERT INTO mybb_attachtypes (name,mimetype,extension,maxsize,icon,enabled,groups,forums,avatarfile) VALUES ('CQCMacroPack','application/octet-stream','CQCMacroPack',180,'images/attachtypes/css.png',1,'-1','-1',0)

Is this limit intentional or just an oversight? Could we possibly get it bumped up a bit? So apparently the extension column is set to VARCHAR(10) in the database. I'm guessing it wouldn't really break any of the code if that was just increased, right?
Reply
#2
Not Solved
Will be fine to bump it up manually in your table, I think it's just been set to 10 as almost all file extensions are 3-4 characters.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#3
Not Solved
Since I'm not a SQL maven, what would be the appropriate command for that? I'm sure I could figure out what I think is the correct thing to do, but I just really don't want to do something stupid at this point after all of the effort involved in getting converted over.

I'm guessing something like this (table/column names may not be right, I'm not looking at the database right now.)

ALTER TABLE mybb_extentiontypes MODIFY extension VARCHAR(16);
Reply
#4
Not Solved
Run this:

ALTER TABLE `mybb_attachtypes` CHANGE `extension` `extension` VARCHAR(16);
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#5
Not Solved
OK, though without the single quotes if doing it via the workbench query screen.

That worked, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)