I just tested this on 1.5.2+, 1.5.4+, and the most recent 1.6.2+ codes, all of them have the same behavior. If you start up a new discussion topic and attach a Adobe illustrator .ai file, it will say it uploaded correctly, but then it WON'T show up (see attached screenshots). This is quite strange. Anyone know what's the issue with this?
It seems that other places for uploading attachments (e.g. assignment, etc.) would accept .ai files just fine.
I have also attached a sample .ai file for anyone who would like to do some more testing..
adding a NEW forum discussion topic with Adobe Illustrator .ai file attachment - disappear
by Wen Hao Chuang -
Number of replies: 6
In reply to Wen Hao Chuang
Re: adding a NEW forum discussion topic with Adobe Illustrator .ai file attachment - disappear
by Wen Hao Chuang -
can't attach either a .jpg or a .ai file for my posting above. I'm trying to reply and attach again and see what happen...
In reply to Wen Hao Chuang
Re: adding a NEW forum discussion topic with Adobe Illustrator .ai file attachment - disappear
by Martin Dougiamas -
Was your JPG file perhaps larger than the upload limit? The below is an 8Kb .ai attachment ... (actually a JPG image renamed)
In reply to Martin Dougiamas
Re: adding a NEW forum discussion topic with Adobe Illustrator .ai file attachment - disappear
by Wen Hao Chuang -
Hi Martin nice to "see" you again...
No the JPG file was not larger than the upload limit (only 5k) but I just found out that the JPG file was corrupted! I just found another "side-bug." The ticket tracking system that we are using (Trac, also open source... see http://trac.edgewall.org), when I tried to mouse right-click to download the screenshot (a 346K jpg file) using Firefox 1.5.0.7, it was downloaded but the file was corrupted (became only 5K). I tried to look at their ChangeLog (http://trac.edgewall.org/wiki/ChangeLog) but couldn't find anyone mentioned about this bug got fixed. Ironically, IE 6 didn't have any trouble at all with downloading those image files. I will probably report this bug to Trac (of firefox)...
Still, as Harry mentioned with his experiment, could we try to fix this glitches ASAP? Many thanks!
No the JPG file was not larger than the upload limit (only 5k) but I just found out that the JPG file was corrupted! I just found another "side-bug." The ticket tracking system that we are using (Trac, also open source... see http://trac.edgewall.org), when I tried to mouse right-click to download the screenshot (a 346K jpg file) using Firefox 1.5.0.7, it was downloaded but the file was corrupted (became only 5K). I tried to look at their ChangeLog (http://trac.edgewall.org/wiki/ChangeLog) but couldn't find anyone mentioned about this bug got fixed. Ironically, IE 6 didn't have any trouble at all with downloading those image files. I will probably report this bug to Trac (of firefox)...
Still, as Harry mentioned with his experiment, could we try to fix this glitches ASAP? Many thanks!
In reply to Wen Hao Chuang
Re: adding a NEW forum discussion topic with Adobe Illustrator .ai file attachment - disappear
by Wen Hao Chuang -
We found a fix for this. Yes it is the MIME issue and the file you need to change is under lib/filelib.php.
The bug is that Moodle is trying to display .ai files as an image but the browser does not recognize it as a image file that it could display. Anyway, all you have to do is to change this line:
'ai' => array ('type'=>'application/postscript', 'icon'=>'image.gif'),
to
'ai' => array ('type'=>'document/unknown', 'icon'=>'ai.gif'),
We also created an ai.gif file which I attached here, for this specific file type.
Maybe the Moodle core team could check this simple hack into 1.5.4+, 1.6.3+, and 1.7+...
Again, as I always said, new features are great, but usability is king! Make Moodle less buggy would really increase users' confidence and this is very important, especially for open-source software... (my 2 cents)
Hope this helps,
The bug is that Moodle is trying to display .ai files as an image but the browser does not recognize it as a image file that it could display. Anyway, all you have to do is to change this line:
'ai' => array ('type'=>'application/postscript', 'icon'=>'image.gif'),
to
'ai' => array ('type'=>'document/unknown', 'icon'=>'ai.gif'),
We also created an ai.gif file which I attached here, for this specific file type.
Maybe the Moodle core team could check this simple hack into 1.5.4+, 1.6.3+, and 1.7+...
Again, as I always said, new features are great, but usability is king! Make Moodle less buggy would really increase users' confidence and this is very important, especially for open-source software... (my 2 cents)
Hope this helps,
In reply to Wen Hao Chuang
Re: adding a NEW forum discussion topic with Adobe Illustrator .ai file attachment - disappear
by Just H -
Congratulations on finding the fix.
I've never attached an Illustrator file to a forum but good to know I can if I need to
I've never attached an Illustrator file to a forum but good to know I can if I need to
In reply to Wen Hao Chuang
Re: adding a NEW forum discussion topic with Adobe Illustrator .ai file attachment - disappear
by Just H -
Just uploading an Illustrator file to see if it works
OK, tried three files:
first was 97kb - didn't show, no error message
second was 73kb - no error message, said it had deleted original attachment (so it must be there someplace?), no show
third was 33kb - no error message, said it had deleted old files in upload area again, still no show.
Would this be a mime type issue?
OK, tried three files:
first was 97kb - didn't show, no error message
second was 73kb - no error message, said it had deleted original attachment (so it must be there someplace?), no show
third was 33kb - no error message, said it had deleted old files in upload area again, still no show.
Would this be a mime type issue?