Fix to upload MS Office 2007 file uploads

Project:ProjectPier
Version:0.8.5.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:new
Description

This solution was provided by dsdoom in the PP forums:

OK,

I have the fix. Increasing the field to VarChar(70) did not work. I scratch my head and thought on it... then saw this post from ActiveCollab and was sure that must have been the problem.

So, I went back in and took a closer look. My Table is setup for UTF8 character set.... a "double byte" character set.

For MS Office Documents you need a little under 70 characters for the mime-strings(2-bytes for each character). Therefore, 70 x 2 = 140 bytes for the strings. I set the field to VarChar(140) and guess what, it works.

Again: I did this using MySQL Administrator, connected to the ProjectPier Schema(Database), opened the table 'pp_project_file_revisions' for modification and set the following new value.

The field I modified was: 'type_string'

I modified the 'type_string' field's datatype (from the "install default size" which was VARCHAR(50)) to be VARCHAR(140).

Everything seems to be working just fine!

Thanks to everyone for all of the good leads in solving this!

You might consider rolling this into the next install release? I don't think Office 2007 and beyond is going away real soon.

Still can't understand why they would put such an abusively long mime-string on the new MS Office files? What a waste of space!

http://www.projectpier.org/node/1112

Version:0.8.0.3» 0.8.5.x-dev

Should be placed in next db update!